Mercurial > dive4elements > gnv-client
changeset 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 | 4bae3081eb1e |
files | gnv-artifacts/ChangeLog gnv-artifacts/src/main/java/de/intevation/gnv/chart/VerticalCrossSectionChart.java |
diffstat | 2 files changed, 14 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog Tue Apr 20 08:45:01 2010 +0000 +++ b/gnv-artifacts/ChangeLog Tue Apr 20 09:42:04 2010 +0000 @@ -1,3 +1,12 @@ +2010-04-20 Ingo Weinzierl <ingo.weinzierl@intevation.de> + + Issue163: Workaround improved. + + * src/main/java/de/intevation/gnv/chart/VerticalCrossSectionChart.java: + Removed the bottom and left space between data area and plot border and + set a padding of 10px between each border of the whole area (containing + plot area, legend, chart title, etc). + 2010-04-20 Ingo Weinzierl <ingo.weinzierl@intevation.de> Issue163: Workaround implemented.
--- 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; }