Annotations - placement?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
iwudh8u
Posts: 1
Joined: Sun Aug 10, 2008 9:23 pm

Annotations - placement?

Post by iwudh8u » Sun Aug 10, 2008 9:27 pm

Hi All,

I am pretty sure I am missing something very basic here but I am struggling with adding XYAnnotations to a plot.

I am trying to add them as
renderer.addAnnotation(new XYTextAnnotation("Some text here", x, y));
where ... x, y and are i reckon the x coordinate and y coordinate for the annotation to be placed.

My question is, how do i determine x and y relative to the plot so i can place it somewhere (say in the center of the graph).

Any pointers pleasee ?

Cheers,
Jay

prassoon
Posts: 14
Joined: Fri May 23, 2008 1:57 am

Post by prassoon » Mon Aug 11, 2008 11:49 pm

depends on what you have on the plot... I have only tried with XYBoxAnnotation and never had problem. What i gave is the bottom left corner and the upper right corner coordinates. In my case it is a date and value combination. Hope that helps!

Locked