[PATCH 1 of 3] Fix compilation of the AreaData change

Wald Commits scm-commit at wald.intevation.org
Fri Dec 20 15:11:09 CET 2013


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1387548608 -3600
# Node ID bf87349bf456bf1a87e6f67b42899ad2d07c88c8
# Parent  dce7b98672139c567e42ac523771ed7c8fc8ba10
Fix compilation of the AreaData change.

diff -r dce7b9867213 -r bf87349bf456 artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator.java	Fri Dec 20 13:09:25 2013 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator.java	Fri Dec 20 15:10:08 2013 +0100
@@ -472,7 +472,7 @@
         if (data.getUpperData() != null) {
             up = new StyledXYSeries(seriesName, false, theme);
             if (data.getUpperData() instanceof WQKms) {
-                if (FacetTypes.IS.Q(data.getRootFacetName())) {
+                if (FacetTypes.IS.Q(data.getUpperFacetName())) {
                     StyledSeriesBuilder.addPointsKmQ(up, (WQKms) data.getUpperData());
                 }
                 else {
@@ -501,7 +501,7 @@
             // the renderer (or anything in between) will not work correctly.
             down = new StyledXYSeries(seriesName + " ", false, theme);
             if (data.getLowerData() instanceof WQKms) {
-                if (FacetTypes.IS.Q(data.getRootFacetName())) {
+                if (FacetTypes.IS.Q(data.getLowerFacetName())) {
                     StyledSeriesBuilder.addPointsKmQ(down, (WQKms) data.getLowerData());
                 }
                 else {
@@ -545,7 +545,10 @@
             area.addSeries(down);
         }
         // Add area to the respective axis.
-        addAreaSeries(area, axisIdxForFacet(data.getRootFacetName()), visible);
+        String facetAxisName = data.getUpperFacetName() == null
+            ? data.getLowerFacetName()
+            : data.getUpperFacetName();
+        addAreaSeries(area, axisIdxForFacet(facetAxisName), visible);
     }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :


More information about the Dive4elements-commits mailing list