Reputation: 5962
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?
Upvotes: 4
Views: 5158
Reputation: 863
I think you mean the legend, that can be easily placed on top in this way:
LegendTitle legend = chart.getLegend();
legend.setPosition(RectangleEdge.TOP);
Upvotes: -1
Reputation: 205805
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
.
Upvotes: 5