diff gnv-artifacts/src/main/java/de/intevation/gnv/chart/VerticalCrossSectionChart.java @ 842:31f63a14a2c3

Improved the workaround of rev955: There is no gap between the left & bottom border and data area anymore (issue163). gnv-artifacts/trunk@956 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 20 Apr 2010 09:42:04 +0000
parents 9cbc8343a04d
children f953c9a559d8
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/chart/VerticalCrossSectionChart.java	Tue Apr 20 08:45:01 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/chart/VerticalCrossSectionChart.java	Tue Apr 20 09:42:04 2010 +0000
@@ -149,8 +149,8 @@
     } // class LocalizedLabelGenerator
 
     public static double MARGIN_TOP    = 0.05d;
-    public static double MARGIN_BOTTOM = 0.05d;
-    public static double MARGIN_LEFT   = 0.05d;
+    public static double MARGIN_BOTTOM = 0.00d;
+    public static double MARGIN_LEFT   = 0.00d;
     public static double MARGIN_RIGHT  = 0.05d;
 
     /**
@@ -319,6 +319,7 @@
         // XXX Workaround, because Axes labels are cut at the
         // left/right/top/bottom edge. The following lines add a white border
         // between data area and plot border.
+        // see http://www.jfree.org/phpBB2/viewtopic.php?f=3&t=22177&start=0&hilit=axis+labels+cut
         ValueAxis xAxis = plot.getDomainAxis();
         Range xRange    = xAxis.getRange();
         xRange = Range.expand(xRange, MARGIN_LEFT, MARGIN_RIGHT);
@@ -331,6 +332,8 @@
         yAxis.setRange(yRange);
         plot.setRangeAxis(yAxis);
 
+        chart.setPadding(new RectangleInsets(10d, 10d, 10d, 10d));
+
         return chart;
     }
 

http://dive4elements.wald.intevation.org