How to put the data on the bar?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Pegasus
Posts: 6
Joined: Wed Oct 07, 2009 12:48 pm
antibot: No, of course not.

How to put the data on the bar?

Post by Pegasus » Wed Oct 07, 2009 12:56 pm

How to put the data on the bar? on top the bar? :?: :( I am newbie

Pegasus
Posts: 6
Joined: Wed Oct 07, 2009 12:48 pm
antibot: No, of course not.

Re: How to put the data on the bar?

Post by Pegasus » Wed Oct 07, 2009 3:26 pm

The solution:

I was able to generate the bar labels at the top of each bar with the following code

Code:
renderer.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator());
renderer.setBaseItemLabelsVisible(true);
renderer.setBasePositiveItemLabelPosition(new ItemLabelPosition(ItemLabelAnchor.OUTSIDE12, TextAnchor.BASELINE_LEFT));

Locked