changeset 6142:a8adf19fbde3

Use FixMilliseconds instead of dates for time periods This works around a JfreeChart limitation that limits dates to valus > 1900 Fix remembered by Sascha Teichmann
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 31 May 2013 16:38:57 +0200
parents 63975955ec61
children 6cdb3ee687a9
files artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveGenerator.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveGenerator.java	Fri May 31 15:43:14 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveGenerator.java	Fri May 31 16:38:57 2013 +0200
@@ -14,6 +14,7 @@
 import org.jfree.chart.plot.XYPlot;
 import org.jfree.data.general.SeriesException;
 import org.jfree.data.time.Day;
+import org.jfree.data.time.FixedMillisecond;
 import org.jfree.data.time.RegularTimePeriod;
 import org.jfree.data.time.TimeSeries;
 import org.jfree.data.time.TimeSeriesCollection;
@@ -260,7 +261,7 @@
         Date start = new Date(timerange.getStart());
         Date end = new Date(timerange.getEnd() - 1000 * 60 * 60 * 24);
 
-        return new RegularTimePeriod[] { new Day(start), new Day(end) };
+        return new RegularTimePeriod[] { new FixedMillisecond(start), new FixedMillisecond(end) };
     }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org