A discussion forum for JFreeChart (a 2D chart library for the Java platform).
-
memonono
- Posts: 5
- Joined: Wed Jun 23, 2004 2:54 pm
Post
by memonono » Sun Jun 27, 2004 3:47 pm
Hi
HOW to show values in bar chart ?
i mean HOW to show values on top of each bar
in the bar chart
thank you
-
nigeledge
Post
by nigeledge » Sun Jul 11, 2004 8:15 pm
I'm curious about this myself. Any insight anyone?
-
rainlord
Post
by rainlord » Tue Jul 13, 2004 6:52 am
This should do the trick. At least in JFreeChart 0.9.17.
Code: Select all
CategoryItemRenderer plotRenderer = plot.getRenderer();
plotRenderer.setLabelGenerator(new StandardCategoryItemLabelGenerator());
plotRenderer.setItemLabelsVisible(true);
-
Guest
Post
by Guest » Sat Aug 14, 2004 1:03 am
Nope. I've tried that, with about a million different variations...at least in 9.20
-
hmcheng
Post
by hmcheng » Mon Aug 16, 2004 6:56 am
In 0.9.20
CategoryItemRenderer plotRenderer = plot.getRenderer();
plotRenderer.setLabelGenerator(new StandardCategoryLabelGenerator() );
plotRenderer.setItemLabelsVisible(true);
-
Guest
Post
by Guest » Thu Aug 19, 2004 6:07 pm
Will this work for 3d bar charts?
-
Ted
- Posts: 4
- Joined: Mon Mar 29, 2004 2:12 pm
Post
by Ted » Thu Aug 19, 2004 6:55 pm
Anonymous wrote:Will this work for 3d bar charts?
Have you tried?
-
Guest
Post
by Guest » Thu Aug 19, 2004 7:18 pm
Yes, the methods don't exist in BarRenderer3D.
This is why i asked.

-
Guest
Post
by Guest » Thu Aug 19, 2004 9:19 pm
Actually it seems that if there's only 1 category, the labels print on the plot, but if there's 2 (what i had) they didn't.
Any ideas?