Hi,
I'm trying to add categorytextannotation but so far I'm having trouble doing that.
Any help? Thanks =) I'm using a CategoryPlot
Jaypee
CategoryTextAnnotation
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Try something like this:
This places the text "Some text..." on the plot at the location ("Category 2", 7.5) - adjust these values to suit your own dataset ranges.
Code: Select all
plot.addAnnotation(new CategoryTextAnnotation("Some text...", "Category 2", 7.5));
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Hi David,
Thanks
I was able to add the annotation however it didnt show up where i wanted to.
How can i get the x value and y value of the points in the dataset??
i used this but 0.184 was hard coded.... how can i get/select the x and y value to get the point in the dataset?:
thanks 
jaypee
Thanks

I was able to add the annotation however it didnt show up where i wanted to.
How can i get the x value and y value of the points in the dataset??
i used this but 0.184 was hard coded.... how can i get/select the x and y value to get the point in the dataset?:
Code: Select all
plot.addAnnotation(new CategoryTextAnnotation("This is a test annotation","Line",0.184));

jaypee