changeset 1943:06d8d371d244

Fix compilation, default 0-excluding behavior of axes. flys-artifacts/trunk@3324 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Mon, 28 Nov 2011 15:00:46 +0000 (2011-11-28)
parents be1270c10d9a
children 21a4d2c677a1
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeCurveGenerator.java flys-artifacts/src/main/java/de/intevation/flys/exports/WDifferencesCurveGenerator.java flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java
diffstat 4 files changed, 14 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Mon Nov 28 14:40:05 2011 +0000
+++ b/flys-artifacts/ChangeLog	Mon Nov 28 15:00:46 2011 +0000
@@ -1,3 +1,14 @@
+2011-11-28  Felix Wolfsteller <felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/exports/WDifferencesCurveGenerator.java:
+	  Fix compilation, use features of XYChartGenerator.
+
+	* src/main/java/de/intevation/flys/exports/XYChartGenerator.java:
+	  Set default behaviour such that 0 is not included in ranges.
+
+	* src/main/java/de/intevation/flys/exports/DischargeCurveGenerator.java:
+	  Set behaviour of axis such that 0 is not (automagically) included.
+
 2011-11-28  Felix Wolfsteller <felix.wolfsteller@intevation.de>
 
 	* src/main/java/de/intevation/flys/exports/StyledSeriesBuilder.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeCurveGenerator.java	Mon Nov 28 14:40:05 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeCurveGenerator.java	Mon Nov 28 15:00:46 2011 +0000
@@ -125,6 +125,7 @@
         }
         NumberAxis axis = new NumberAxis(label);
         axis.setLabelFont(labelFont);
+        axis.setAutoRangeIncludesZero(false);
         return axis;
     }
 
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/WDifferencesCurveGenerator.java	Mon Nov 28 14:40:05 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/WDifferencesCurveGenerator.java	Mon Nov 28 15:00:46 2011 +0000
@@ -262,28 +262,8 @@
         }
     }
 
-    @Override
-    protected NumberAxis createYAxis(int index) {
-        String s = "" + index;
-        return new NumberAxis(s);
-    }
 
     /**
-     * Disable Longitudinals behaviour to include "0" in the Q axis.
-     *
-     * @param range range with which to look up upper bound.
-     * @return range to be used for "auto-scaling" axis.
-     */
-    @Override
-    protected Range createSecondAxisRange(Range range) {
-        if (range == null) {
-            return range;
-        }
-        return new Range(range.getLowerBound(), range.getUpperBound());
-    }
-
- 
-    /**
      * 
      */
     @Override
@@ -296,6 +276,7 @@
         return chart;
     }
 
+
     /**
      * Get name of series (displayed in legend).
      * @return name of the series.
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java	Mon Nov 28 14:40:05 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java	Mon Nov 28 15:00:46 2011 +0000
@@ -388,6 +388,7 @@
      */
     protected NumberAxis createYAxis(int index) {
         NumberAxis axis = new NumberAxis(getYAxisLabel());
+        axis.setAutoRangeIncludesZero(false);
         return axis;
     }
 

http://dive4elements.wald.intevation.org