changeset 6471:c5eaa1fcd52b

ExtremeWQCurveGenerator: Put data on cm axis if at gauge.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 27 Jun 2013 10:47:13 +0200
parents 74c1b052ad28
children 4bbad31c8616
files artifacts/src/main/java/org/dive4elements/river/exports/extreme/ExtremeWQCurveGenerator.java
diffstat 1 files changed, 17 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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);
     }
 
 

http://dive4elements.wald.intevation.org