changeset 1902:6c5229d0b8e5

Refactored to use StyledSeriesBuilder to add Points to DataSeries. flys-artifacts/trunk@3262 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 16 Nov 2011 09:35:00 +0000
parents da52932f3bc1
children f116a8aa4365
files flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java	Wed Nov 16 09:21:34 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java	Wed Nov 16 09:35:00 2011 +0000
@@ -131,6 +131,7 @@
 
         XYSeries series = new StyledXYSeries(facet.getDescription(), theme);
         StyledSeriesBuilder.addPoints(series, data);
+
         addFirstAxisSeries(series, visible);
     }
 
@@ -147,13 +148,9 @@
     ) {
         int size = wqkms.size();
 
-        double[]   res  = new double[3];
 
         XYSeries series = new StyledXYSeries(facet.getDescription(), theme);
-        for (int i = 0; i < size; i++) {
-            res = wqkms.get(i, res);
-            series.add(res[1], res[0]);
-        }
+        StyledSeriesBuilder.addPointsQW(series, wqkms);
 
         addFirstAxisSeries(series, visible);
     }

http://dive4elements.wald.intevation.org