feature req: arbitrary category axis label angle

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Rich

feature req: arbitrary category axis label angle

Post by Rich » Thu Aug 29, 2002 10:45 pm

A (relatively) minor feature request:

In looking at HorizontalCategoryAxis, I see that there's a boolean flag for verticalCategoryLabels, which determines whether to call drawString or drawRotatedString.

Would it be difficult to amend that field to be a float, which is then passed to drawRotatedString (instead of hard-coding -Math.PI/2)? The only thing I'm not sure about is how that would affect refreshTicks(), reserveHeight() and reserveAxisArea()

Cheers,
Rich

David Gilbert

Re: feature req: arbitrary category axis label angle

Post by David Gilbert » Fri Aug 30, 2002 7:50 am

It's a good suggestion.

The code would be slightly complicated because for certain rotations you would want the start of the label to be anchored near the center of the category on the plot, but for other rotations you would want the end of the label to be anchored. And, as you guessed, the reserveHeight etc. would need modifying.

I won't have time to work on this for a while, so I hope someone else will try to get it working. I'd recommend adding a feature request on SourceForge so that the idea doesn't get forgotten...

Regards,

DG.

Locked