changeset 7718:bf87349bf456

Fix compilation of the AreaData change.
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 20 Dec 2013 15:10:08 +0100
parents dce7b9867213
children 20b4dd8a47eb
files artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator.java
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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 :

http://dive4elements.wald.intevation.org