diff gnv-artifacts/src/main/java/de/intevation/gnv/chart/TimeSeriesChart.java @ 831:bcdcce146c14

Read a system property to adjust the percentage that defines the size of a gap in charts (issue175). gnv-artifacts/trunk@930 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 15 Apr 2010 07:20:05 +0000
parents e8a9e84a0328
children 2423cefe7d39
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/chart/TimeSeriesChart.java	Tue Apr 13 14:35:30 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/chart/TimeSeriesChart.java	Thu Apr 15 07:20:05 2010 +0000
@@ -65,13 +65,19 @@
     /**
      * Percentage used for gap detection. Its value is {@value}.
      */
-    public static final int    GAP_SIZE    = 5; // in percent
+    public static int    GAP_SIZE    = 5; // in percent
 
     /**
      * Logger used for logging with log4j.
      */
     private static Logger log = Logger.getLogger(TimeSeriesChart.class);
 
+    static {
+        /* The percentage defining the width of a gap should be configured in 
+         * conf.xml instead of being configured in a system property */
+        GAP_SIZE = Integer.getInteger("chart.gap.percentage", GAP_SIZE);
+    }
+
 
     /**
      * Constructor used to create <code>TimeSeries</code> charts.

http://dive4elements.wald.intevation.org