diff gnv-artifacts/src/main/java/de/intevation/gnv/chart/TimeSeriesChart.java @ 327:22a6493e8460

New options in chart template: visibility of lines and points in charts and point's size. gnv-artifacts/trunk@393 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 02 Dec 2009 10:50:12 +0000
parents 63f8b3fb7d9a
children 42a5269636eb
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/chart/TimeSeriesChart.java	Tue Dec 01 16:27:56 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/chart/TimeSeriesChart.java	Wed Dec 02 10:50:12 2009 +0000
@@ -43,7 +43,9 @@
         Collection  dates,
         Collection  result,
         Collection  timeGaps,
-        Locale      locale
+        Locale      locale,
+        boolean     linesVisible,
+        boolean     shapesVisible
     ) {
         this.labels           = labels;
         this.theme            = theme;
@@ -54,6 +56,8 @@
         this.timeGaps         = timeGaps;
         this.locale           = locale;
         this.PLOT_ORIENTATION = PlotOrientation.VERTICAL;
+        this.linesVisible     = linesVisible;
+        this.shapesVisible    = shapesVisible;
     }
 
 
@@ -106,7 +110,8 @@
 
                 if(series != null) {
                     addSeries(series, idx);
-                    prepareAxis(((String)series.getKey()), idx++);
+                    prepareAxis(((String)series.getKey()), idx);
+                    adjustRenderer(idx++, linesVisible, shapesVisible);
                 }
 
                 // prepare variables for next plot
@@ -130,8 +135,10 @@
         // add the last dataset if existing to plot and prepare its axis
         addSeries(series, idx);
 
-        if (series != null)
-            prepareAxis(((String)series.getKey()), idx++);
+        if (series != null) {
+            prepareAxis(((String)series.getKey()), idx);
+            adjustRenderer(idx++, linesVisible, shapesVisible);
+        }
     }
 
 

http://dive4elements.wald.intevation.org