org.jfree.chart.axis.DateAxis axis = (org.jfree.chart.axis.DateAxis)plot.getDomainAxis();
axis.setTickUnit(new org.jfree.chart.axis.DateTickUnit(org.jfree.chart.axis.DateTickUnit.HOUR, 1), false, false);
If my values fall in the range of 2:00 am - 2:00 pm, DateAxis still starts from 2:00 am and ends at 2:00 pm.
I want to DateAxis to show every hour between 12:00 am to 12:00 pm no matter what.
Thanks you in advance.
DateAxis: showing every hours for a day.
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
You can use the setRange() method to specify the axis range.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

