[英]jfree line chart display value for every index
I am trying to create a using jfree chart library line chart and i need to display the value associated with each index in the lineChart, I cannot use a tool tip for this because I am converting the chart into an image, is there a way of displaying the value on top of each index?我正在尝试创建一个使用 jfree 图表库折线图,我需要在 lineChart 中显示与每个索引关联的值,我不能为此使用工具提示,因为我正在将图表转换为图像,有没有办法在每个索引的顶部显示值?
Thanks, Bhavya谢谢, 巴维亚
Depending on your needs, several option are available:根据您的需要,有几个选项可供选择:
Use an org.jfree.chart.labels.XYItemLabelGenerator
, shown here and here .使用
org.jfree.chart.labels.XYItemLabelGenerator
,显示在此处和此处。
Use a suitable one of the many org.jfree.chart.annotations
, shown here .使用此处所示的众多
org.jfree.chart.annotations
中的一个合适的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.