How to rotate the domain labels to allow longer labels

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
jusepi
Posts: 16
Joined: Tue May 09, 2006 1:18 pm
Location: USA

How to rotate the domain labels to allow longer labels

Post by jusepi » Tue May 09, 2006 1:22 pm

I'm trying to figure out how to rotate the x-axis labels in a Category plot, but I can't seem to find any info on this. I'd like to be able to rotate the text to 45 degrees so that I can see the full date. Thanks in advance.

skunk
Posts: 1087
Joined: Thu Jun 02, 2005 10:14 pm
Location: Brisbane, Australia

Post by skunk » Tue May 09, 2006 1:55 pm

Code: Select all

plot.getDomainAxis().setCategoryLabelPositions(CategoryLabelPositions.UP_45);

jusepi
Posts: 16
Joined: Tue May 09, 2006 1:18 pm
Location: USA

Post by jusepi » Tue May 09, 2006 10:01 pm

Nice, works perfect. Thanks much!

Locked