Label on bars in JFreeChart Bar Graph

ireportjasper-reportsjfreechart

Please consider following graph :
enter image description here

The above bar graph is built using jfreechart. I have two questions:

1) Values (1,5,4 etc.)are printed on the top but within the bars.How to display these on the top but above the bars?

2)Each value is printed on the bars in horizontal manner. How to display them in proper vertical manner?

Thanks…

Best Answer

You should take a look at ItemLabelPosition, as explained here.

It is a property on the BarRenderer for the given chart. Try experimenting with the different values for the desired result.

Related Topic