Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java @ 734:56d70e546800
#174 Longitudinal section charts will now have an upper margin again.
flys-artifacts/trunk@2229 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 24 Jun 2011 12:05:13 +0000 |
parents | d60cc6453d45 |
children | f959faaa7c4a |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java Fri Jun 24 09:49:27 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java Fri Jun 24 12:05:13 2011 +0000 @@ -165,14 +165,12 @@ */ @Override protected boolean zoomY(XYPlot plot, ValueAxis axis, Range range, Range x) { - boolean zoomin = super.zoomY(plot, axis, range, x); - - // we want the Q axis to start at 0 if no zooming has been done - if (!zoomin && plot.getRangeAxisIndex(axis) == 1) { - axis.setLowerBound(0d); + if (plot.getRangeAxisIndex(axis) == 1) { + // we want the Q axis to start at 0 if no zooming has been done + range = new Range(0d, range.getUpperBound()); } - return zoomin; + return super.zoomY(plot, axis, range, x); }