changeset 6881:32af7e5cb00f

issue1378: Prepare StyledSeriesBuilder to get double[][] values to translate.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 21 Aug 2013 11:10:45 +0200 (2013-08-21)
parents 8a4e344b309a
children a77dca301419
files artifacts/src/main/java/org/dive4elements/river/exports/StyledSeriesBuilder.java
diffstat 1 files changed, 21 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/StyledSeriesBuilder.java	Tue Aug 20 15:05:07 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/StyledSeriesBuilder.java	Wed Aug 21 11:10:45 2013 +0200
@@ -304,6 +304,27 @@
      * W values and scaling it with wScale.
      *
      * @param series Series to add points to.
+     * @param qws to add to series.
+     * @param wAdd Value to add to each Q while adding to series.
+     * @param wScale multiply with
+     */
+    public static void addPointsQW(XYSeries series, double[][] qws, double wTrans, double wScale) {
+        if (qws == null || qws.length == 0) {
+            return;
+        }
+
+        double x[] = qws[0];
+        double y[] = qws[1];
+
+        for (int i = 0; i < x.length; i++) {
+            series.add(x[i], wScale * (y[i] + wTrans), false);
+        }
+    }
+    /**
+     * Add points to series (q to 1st dim, w to 2nd dim), adding wTrans to the
+     * W values and scaling it with wScale.
+     *
+     * @param series Series to add points to.
      * @param wqkms WQKms to add to series.
      * @param wAdd Value to add to each Q while adding to series.
      * @param wScale multiply with

http://dive4elements.wald.intevation.org