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 v开发者_运维技巧alue on top of each index?
Thanks, Bhavya
Depending on your needs, several option are available:
Use an
org.jfree.chart.labels.XYItemLabelGenerator
, shown here and here.Use a suitable one of the many
org.jfree.chart.annotations
, shown here.
精彩评论