I want to display the labels on top of the bar in a multi series chart using JFree. Please tell me how to accomplish this?
Asked
Active
Viewed 5,043 times
2 Answers
5
As this is a bar chart, add an instance of StandardCategoryItemLabelGenerator
to your plot's renderer. See the source for the meaning of elements in the labelFormat
string. Here's a related example using StandardXYItemLabelGenerator
.

trashgod
- 203,806
- 29
- 246
- 1,045
-1
I think you mean the legend, that can be easily placed on top in this way:
LegendTitle legend = chart.getLegend();
legend.setPosition(RectangleEdge.TOP);

Jupiter Jones
- 863
- 1
- 7
- 12