changing position of x-axis labels on demo StackedBarChart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
lengrexin
Posts: 8
Joined: Mon Dec 31, 2007 8:13 pm

changing position of x-axis labels on demo StackedBarChart

Post by lengrexin » Wed Aug 06, 2008 10:56 pm

Hi,
I am looking at this demo:
http://www.java2s.com/Code/Java/Chart/J ... tDemo4.htm


My question is how do I change the angle of the x-axis labels? I understand that there is this function 'setLabelAngle' that can change the angle. I want to change the angle for 'Jan 04', 'Feb 04', and 'Mar 04'.

I've tried:
plot.getDomainAxis().setLabelAngle(Math.PI * -0.25);

and

chart.getXYPlot().getDomainAxis().setLabelAngle(Math.PI * -0.25);

But both of them change the 'Product/Month' label instead.

Thanks.

Locked