Hi ,
I am creating a time-series chart using JFreeChart-0.9.3.
I just want to display the date in the horizontal axis for every day.
How can I get this done with 0.9.3 ?
Thanks so much.
Question on horizontal display
Re: Question on horizontal display
In 0.9.3, you could call the setTickUnit(...) method on the DateAxis and pass it a DateUnit object. The DateUnit could be constructed like this to represent one day:
DateUnit unit = new DateUnit(Calendar.DATE, 1);
This has changed in 0.9.4 to work the same way as the NumberAxis tick units.
Regards,
Dave Gilbert
DateUnit unit = new DateUnit(Calendar.DATE, 1);
This has changed in 0.9.4 to work the same way as the NumberAxis tick units.
Regards,
Dave Gilbert
Re: Question on horizontal display
Thanks DG,
I got every day is displayed but the date is overlapped.
How can I make the date displayed vertically to avoid the overlapping ?
Thanks so much.
I got every day is displayed but the date is overlapped.
How can I make the date displayed vertically to avoid the overlapping ?
Thanks so much.
Re: Question on horizontal display
Hi Artemis,
I think it is something like this:
XYPlot plot = myChart.getXYPlot();
HorizontalDateAxis axis = (HorizontalDateAxis) plot.getDomainAxis();
axis.setVerticalTickLabels (true);
Regards,
Dave Gilbert
I think it is something like this:
XYPlot plot = myChart.getXYPlot();
HorizontalDateAxis axis = (HorizontalDateAxis) plot.getDomainAxis();
axis.setVerticalTickLabels (true);
Regards,
Dave Gilbert