changeset 8489:be5ce2882708

Time series chart: bounds cannot allways be assumed to be given.
author Tom Gottfried <tom@intevation.de>
date Tue, 02 Dec 2014 15:25:34 +0100
parents a63825ab9df9
children 07df414d5d88
files artifacts/src/main/java/org/dive4elements/river/exports/TimeseriesChartGenerator.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/TimeseriesChartGenerator.java	Tue Dec 02 15:23:01 2014 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/TimeseriesChartGenerator.java	Tue Dec 02 15:25:34 2014 +0100
@@ -853,8 +853,10 @@
         axisSection.setFontSize(14);
         axisSection.setFixed(false);
 
-        axisSection.setUpperTimeRange(getRightX());
-        axisSection.setLowerTimeRange(getLeftX());
+        long rightX = xBounds.isEmpty() ? 0 : getRightX();
+        long leftX = xBounds.isEmpty() ? 0 : getLeftX();
+        axisSection.setUpperTimeRange(rightX);
+        axisSection.setLowerTimeRange(leftX);
 
         axisSections.add(axisSection);
 

http://dive4elements.wald.intevation.org