diff artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java @ 8338:ac7cb15e1946

Scale second W-axis in cm according to first axis, which is expanded relative to the data, and set bounds for zooming purposes (plus a bit of cleanup in DiagramGenerator).
author "Tom Gottfried <tom@intevation.de>"
date Fri, 26 Sep 2014 18:23:45 +0200
parents 2f7f9ced46a5
children 130160b8d245
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java	Fri Sep 26 17:22:51 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java	Fri Sep 26 18:23:45 2014 +0200
@@ -671,7 +671,7 @@
             xAxis.setRange(fixedXRange);
         }
         else {
-            zoomX(plot, xAxis, getXBounds(0), xrange);
+            zoom(plot, xAxis, getXBounds(0), xrange);
         }
 
         for (int i = 0, num = plot.getRangeAxisCount(); i < num; i++) {
@@ -693,7 +693,7 @@
             }
 
             log.debug("Prepare zoom settings for y axis at index: " + i);
-            zoomY(plot, yaxis, getYBounds(Integer.valueOf(i)), yrange);
+            zoom(plot, yaxis, getYBounds(Integer.valueOf(i)), yrange);
         }
     }
 
@@ -764,23 +764,13 @@
     }
 
 
-    protected boolean zoomX(XYPlot plot, ValueAxis axis, Bounds bounds, Range x) {
-        return zoom(plot, axis, bounds, x);
-    }
-
-
-    protected boolean zoomY(XYPlot plot, ValueAxis axis, Bounds bounds, Range x) {
-        return zoom(plot, axis, bounds, x);
-    }
-
-
     /**
-     * Zooms the x axis to the range specified in the attribute document.
+     * Zooms the axis to the range specified in the attribute document.
      *
-     * @param plot  The XYPlot.
-     * @param axis  The axis the shoud be modified.
+     * @param plot   The XYPlot.
+     * @param axis   The axis that should be modified.
      * @param bounds The whole range specified by a dataset.
-     * @param x     A user defined range (null permitted).
+     * @param x      A user defined range (null permitted).
      *
      * @return true, if a zoom range was specified, otherwise false.
      */

http://dive4elements.wald.intevation.org