List of usage examples for org.jfree.chart.axis ExtendedDateAxis setMaximumDate
public void setMaximumDate(Date maximumDate)
From source file:no.met.jtimeseries.chart.ChartPlotter.java
/** * Set the range of the domain axis./*from ww w.ja v a 2 s .c om*/ * * @param minDate * The minimum date value for the domain axis. * @param maxDate * The maximum date value for the domain axis. */ public void setDomainRange(Date minDate, Date maxDate) { ValueAxis domainAxis = plot.getDomainAxis(); if (!(domainAxis instanceof DateAxis)) { throw new IllegalStateException("Domain axis was not a DateAxis"); } ExtendedDateAxis dateAxis = (ExtendedDateAxis) domainAxis; dateAxis.setMinimumDate(minDate); dateAxis.setMaximumDate(maxDate); // if this was not set the first tick would not be calculated correctly for the long // term meteogram, but it would be one hour of. dateAxis.setStartDate(minDate); }