[Dive4elements-commits] [PATCH 12 of 13] ExtremeWQCurveGenerator: Put data on cm axis if at gauge

Wald Commits scm-commit at wald.intevation.org
Thu Jun 27 10:40:21 CEST 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1372322833 -7200
# Node ID c5eaa1fcd52b74cdaea001f26812003f3087c99d
# Parent  74c1b052ad285794a1281ba18ee4e65c8deaaa57
ExtremeWQCurveGenerator: Put data on cm axis if at gauge.

diff -r 74c1b052ad28 -r c5eaa1fcd52b artifacts/src/main/java/org/dive4elements/river/exports/extreme/ExtremeWQCurveGenerator.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/extreme/ExtremeWQCurveGenerator.java	Thu Jun 27 10:46:13 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/extreme/ExtremeWQCurveGenerator.java	Thu Jun 27 10:47:13 2013 +0200
@@ -103,9 +103,24 @@
         }
 
         XYSeries qwseries = new StyledXYSeries(aaf.getFacetDescription(), theme);
-        StyledSeriesBuilder.addPointsQW(qwseries, curve.getQs(), curve.getWs());
 
-        addAxisSeries(qwseries, YAXIS.W.idx, visible);
+        double gaugeDatum = getCurrentGaugeDatum();
+
+        if (gaugeDatum == 0d) {
+            StyledSeriesBuilder.addPointsQW(qwseries, curve.getQs(), curve.getWs());
+            addAxisSeries(qwseries, YAXIS.W.idx, visible);
+        }
+        else {
+            XYSeries series2 = new StyledXYSeries(aaf.getFacetDescription(), theme);
+            StyledSeriesBuilder.addPointsQW(series2, curve.getQs(), curve.getWs());
+            addAxisSeries(series2, YAXIS.W.idx, false);
+
+            StyledSeriesBuilder.addPointsQW(qwseries, curve.getQs(), curve.getWs(), -gaugeDatum, 100d);
+
+            addAxisSeries(qwseries, YAXIS.WCm.idx, visible);
+        }
+
+        //addAxisSeries(qwseries, YAXIS.W.idx, visible);
     }
 
 


More information about the Dive4elements-commits mailing list