We need to label our individual lines (ie. 5th, 10th, 25th, 50th, etc) to look like this:
http://www.cdc.gov/nchs/about/major/nha ... hart01.pdf
Is this possible? If so, how do we do this? If not, can we expect it as a future enhancement?
Thanks,
BS
Label a line on an Overlaid Chart
Re: Label a line on an Overlaid Chart
It's not possible. It is one of the things that I'd like to cover with a 'chart annotations' facility. You should be able to add an annotation (text item, or shape, or image) to a list maintained by XYPlot along with the location (in terms of data values). Then the plot would draw these items on the chart after it has finished drawing all the lines.
For example, you might have something like this:
XYPlot plot = myChart.getXYPlot();
plot.addAnnotation("97th", 37, 39.5);
plot.addAnnotation("95th", 37, 38.5);
...
The 37 is the value on the x-axis, the 39.5/38.5 is the value on the y-axis.
This would be really easy to implement, I'll see if I can get something in for 0.9.3.
Regards,
DG.
For example, you might have something like this:
XYPlot plot = myChart.getXYPlot();
plot.addAnnotation("97th", 37, 39.5);
plot.addAnnotation("95th", 37, 38.5);
...
The 37 is the value on the x-axis, the 39.5/38.5 is the value on the y-axis.
This would be really easy to implement, I'll see if I can get something in for 0.9.3.
Regards,
DG.
Re: Label a line on an Overlaid Chart
>Re: Version 0.9.3 released...
>Author: David Gilbert
>Date: 09-04-02 23:08
>Hi BS,
>I put together a very basic annotation framework in this release. The >AnnotationDemo1.java file is provided as an example.
>Regards,
>DG.
Hi DG,
This works and looks great! Thanks for your help and quick delivery.
Sincerely,
BS
>Author: David Gilbert
>Date: 09-04-02 23:08
>Hi BS,
>I put together a very basic annotation framework in this release. The >AnnotationDemo1.java file is provided as an example.
>Regards,
>DG.
Hi DG,
This works and looks great! Thanks for your help and quick delivery.

Sincerely,
BS
Re: Label a line on an Overlaid Chart
If I want to add XYTextAnnotation to TimeSeriesChart, how to set the value of x-coordinate in constructor of XYTextAnnontation.
Thanks,
Aurorean.
Thanks,
Aurorean.
Re: Label a line on an Overlaid Chart
This problem is answered!---http://www.object-refinery.com/phorum-3 ... 600&t=4600