Rotating dates on times series chart

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

Rotating dates on times series chart

Post by Kenny Dubuisson » Wed Dec 11, 2002 6:39 pm

I wish to rotate the date labels on my basic time series chart from the norm of horizontal display to vertical. Is there a way to do this? If so any example code would be most helpful.
Thanks,
Kenny

Dr.T

Re: Rotating dates on times series chart

Post by Dr.T » Wed Dec 11, 2002 9:59 pm

axisX.setVerticalTickLabels(true);

David Gilbert

Re: Rotating dates on times series chart

Post by David Gilbert » Wed Dec 11, 2002 11:19 pm

Hi Kenny,

Dr. T is correct. Your code should look something like this (for a time series chart):

XYPlot plot = myChart.getXYPlot();
HorizontalDateAxis axis = (HorizontalDateAxis) plot.getDomainAxis();
axis.setVerticalTickLabels(true);

Regards,

DG

Locked