Rotate label text on XYPointerAnnotation

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
forsey85
Posts: 17
Joined: Mon Jul 03, 2006 2:55 pm

Rotate label text on XYPointerAnnotation

Post by forsey85 » Thu Sep 21, 2006 2:23 pm

Hi,

Im using XYPointerAnnotations to mark some points on a graph to the user.

I would like to make the label on the XYPointerAnnotation printed vertically. The setAngle method sets the angle for the arrow, but I cannot find a method to set the angle of the label.

I have tried using a seperate XYTextAnnotation, but it is hard to keep it grouped with the pointer when the user zooms in.

Any help would be appreciated.

Ian

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Thu Sep 21, 2006 3:27 pm

I took a look at the drawing code, and it doesn't do any rotation on the text, so you'd need to modify that. The XYPointerAnnotation class does inherit the text rotation settings from XYTextAnnotation, but doesn't use them. I guess that could be considered a bug. I hope to come back to this.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked