[Schmitzm-commits] r484 - branches/1.0-gt2-2.6/src/schmitzm/jfree

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Oct 20 17:32:59 CEST 2009


Author: mojays
Date: 2009-10-20 17:32:58 +0200 (Tue, 20 Oct 2009)
New Revision: 484

Modified:
   branches/1.0-gt2-2.6/src/schmitzm/jfree/JFreeChartUtil.java
Log:
Chart centering: Fixed the "10% zooming on centering"-bug

Modified: branches/1.0-gt2-2.6/src/schmitzm/jfree/JFreeChartUtil.java
===================================================================
--- branches/1.0-gt2-2.6/src/schmitzm/jfree/JFreeChartUtil.java	2009-10-20 14:16:01 UTC (rev 483)
+++ branches/1.0-gt2-2.6/src/schmitzm/jfree/JFreeChartUtil.java	2009-10-20 15:32:58 UTC (rev 484)
@@ -181,6 +181,9 @@
    *                    {@value #DEFAULT_CENTRATION_BOUNDARY_PCT} is used).
    */
   public static void centerAxis(ValueAxis axis, Double boundaryPct) {
+    // first recalculate the full extend 
+    axis.setAutoRange(true);
+    // then reset the centering
     double absMax = getAbsRange(axis.getRange(),boundaryPct);
     axis.setRange(-absMax, absMax);
   }



More information about the Schmitzm-commits mailing list