changeset 734:56d70e546800

#174 Longitudinal section charts will now have an upper margin again. flys-artifacts/trunk@2229 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 24 Jun 2011 12:05:13 +0000
parents 5f5e67aceb8c
children db68806e6563
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java
diffstat 2 files changed, 12 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Fri Jun 24 09:49:27 2011 +0000
+++ b/flys-artifacts/ChangeLog	Fri Jun 24 12:05:13 2011 +0000
@@ -1,3 +1,11 @@
+2011-06-24  Ingo Weinzierl <ingo@intevation.de>
+
+	  flys/issue174 (Diagramm: Q-Linie wird bei initialem Laden des Diagramms
+	  anders dargestellt als bei Ansicht auf gesamten Wertebereich)
+
+	* src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java:
+	  The chart will now have upper margins again.
+
 2011-06-24  Ingo Weinzierl <ingo@intevation.de>
 
 	  flys/issue172 (Diagramm: Ursprung der Diagramme bei Dauerzahlen)
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java	Fri Jun 24 09:49:27 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java	Fri Jun 24 12:05:13 2011 +0000
@@ -165,14 +165,12 @@
      */
     @Override
     protected boolean zoomY(XYPlot plot, ValueAxis axis, Range range, Range x) {
-        boolean zoomin = super.zoomY(plot, axis, range, x);
-
-        // we want the Q axis to start at 0 if no zooming has been done
-        if (!zoomin && plot.getRangeAxisIndex(axis) == 1) {
-            axis.setLowerBound(0d);
+        if (plot.getRangeAxisIndex(axis) == 1) {
+            // we want the Q axis to start at 0 if no zooming has been done
+            range = new Range(0d, range.getUpperBound());
         }
 
-        return zoomin;
+        return super.zoomY(plot, axis, range, x);
     }
 
 

http://dive4elements.wald.intevation.org