diff flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeLongitudinalSectionGenerator.java @ 1684:bdb05dc9b763

Bugfix: #353 Enabled chart's to be drawn with proper axes set even if no data is contained. flys-artifacts/trunk@2902 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 07 Oct 2011 10:51:09 +0000
parents 0cb1a70b8b92
children 7e19449d7826
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeLongitudinalSectionGenerator.java	Fri Oct 07 09:40:15 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeLongitudinalSectionGenerator.java	Fri Oct 07 10:51:09 2011 +0000
@@ -34,7 +34,12 @@
 
 
     @Override
-    public void doOut(Artifact artifact, Facet facet, Document attr) {
+    public void doOut(
+        Artifact artifact,
+        Facet    facet,
+        Document attr,
+        boolean  visible
+    ) {
         logger.debug("DischargeLongitudinalSectionGenerator.doOut");
 
         if (facet == null) {
@@ -51,13 +56,16 @@
         Facet        f    = flys.getNativeFacet(facet);
 
         if (name.equals(DISCHARGE_LONGITUDINAL_W)) {
-            doWOut((WQKms) f.getData(artifact, context), attr);
+            doWOut((WQKms) f.getData(artifact, context), attr, visible);
         }
         else if (name.equals(DISCHARGE_LONGITUDINAL_Q)) {
-            doQOut((WQKms) f.getData(artifact, context), attr);
+            doQOut((WQKms) f.getData(artifact, context), attr, visible);
         }
         else if (name.equals(DISCHARGE_LONGITUDINAL_C)) {
-            doCorrectedWOut((WQCKms) f.getData(artifact, context), attr);
+            doCorrectedWOut(
+                (WQCKms) f.getData(artifact, context),
+                attr,
+                visible);
         }
         else {
             logger.warn("Unknown facet name: " + name);
@@ -71,7 +79,11 @@
      * @param wqckms The object that contains the corrected W values.
      * @param theme The theme that contains styling information.
      */
-    protected void doCorrectedWOut(WQCKms wqckms, Document theme) {
+    protected void doCorrectedWOut(
+        WQCKms   wqckms,
+        Document theme,
+        boolean  visible
+    ) {
         logger.debug("DischargeLongitudinalSectionGenerator.doCorrectedWOut");
 
         int size = wqckms.size();
@@ -85,7 +97,7 @@
                 series.add(wqckms.getKm(i), wqckms.getC(i));
             }
 
-            addFirstAxisSeries(series);
+            addFirstAxisSeries(series, visible);
         }
 
         if (wqckms.guessWaterIncreasing()) {

http://dive4elements.wald.intevation.org