Value on top of a vertical bar chart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Jordi March

Value on top of a vertical bar chart

Post by Jordi March » Mon Mar 10, 2003 5:21 pm

Greetings,

I've got two different types of renderers working nowadays: verticalBarRenderer3D plus the horizontal one. In a short time I'll need the value of each column just on top of every bar of the chart (same way when doing horizontalBarRenderer...). The problem is that, AFAIK, I'd have to deal with AWT stuff when drawing each bar....

One simple workaround is to attach the value on the bottom, but this doesn't always suit my needs, so I guess if there would be any possibility to attach them on the very top of each bar.... a simple one, by the way ;-)

Thanks very much.

Jordi G. March

David Gilbert

Re: Value on top of a vertical bar chart

Post by David Gilbert » Tue Mar 11, 2003 2:43 pm

There is a method setValueLabelsVisible(boolean) in the CategoryPlot class. Some renderers will look at this flag and, if it is set to true, draw the value of each data item as text nearby the data point (for example, above the bars in a bar chart). This feature is incomplete...it will work for some charts, but not for others.

Regards,

Dave Gilbert

Jordi March

Re: Value on top of a vertical bar chart

Post by Jordi March » Tue Mar 11, 2003 4:00 pm

Thank you David,

I just got the answer from a previous post, but I didn't "close" this one either...

Thank you very much anyway.

Jordi

Locked