how to Rotating axies for random degree

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

how to Rotating axies for random degree

Post by xia » Thu Jan 16, 2003 2:28 am

now i have an horizontal bar chart with too many categories so the labels looks like:
t t
e e
s s
t t

Instead of rotating the categorie label test 45 degrees. Can anyone help me??

David Gilbert

Re: how to Rotating axies for random degree

Post by David Gilbert » Thu Jan 16, 2003 4:32 pm

The labels can be rotated 90 degrees like this:

CategoryPlot plot = myChart.getCategoryPlot();
HorizontalCategoryAxis axis = (HorizontalCategoryaAxis) getDomainAxis();
axis.setVerticalTickLabels(true);

Regards,

Dave Gilbert

Locked