Hi All,
The JFreeChart works great. I need to display a horizontal line indicating the average value of the vertical bars (along with its value on the y axis). How do I go about this? I could not find this feature in the code (version 0.7.3).
Thanks,
Santosh
Horizontal line in Vertical bar graph
Re: Horizontal line in Vertical bar graph
Hi Santosh,
There's no way to do that in JFreeChart at the moment, unless you modify the code a little.
Another developer added a feature to the XYPlot class to add horizontal and vertical lines to the plot at arbitrary values. You could implement something similar in the VerticalBarPlot class. You'll notice two calls in the XYPlot.draw(...) method that go off and draw the horizontal lines and the vertical lines...that would be one way to do it.
Regards,
DG
There's no way to do that in JFreeChart at the moment, unless you modify the code a little.
Another developer added a feature to the XYPlot class to add horizontal and vertical lines to the plot at arbitrary values. You could implement something similar in the VerticalBarPlot class. You'll notice two calls in the XYPlot.draw(...) method that go off and draw the horizontal lines and the vertical lines...that would be one way to do it.
Regards,
DG