Setting labels in multiple range axis graph.

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
lata
Posts: 5
Joined: Tue Jan 17, 2006 1:55 pm

Setting labels in multiple range axis graph.

Post by lata » Fri Dec 07, 2007 11:19 am

Hi,

I have a categoryplot with multiple range aixs. Now when I am plotting datasets with these corresponding axes, I am not able to set the labels for these datasets of different axes respectively.

The category text annotation that I am using is always being set in the position specified by the category axis. Now if a label is to be set to the dataset of a different axis, how to go about it?

Please help.
Lata Chuphal

znasim
Posts: 10
Joined: Wed Feb 20, 2008 7:06 am

Label

Post by znasim » Tue May 13, 2008 7:58 am

Hi Lata
If you want to add some label into chart then you use XYTextAnnotation class. It,s Constructor is
XYTextAnnotation xyant=new XYTextAnnotation(labelString,xaxisValue,yaxisValue,);
And then add this annotation Object into Plot Object
Like this plot.addAnnotation(xyant);

:)
Md Zahid Nasim

Locked