comparison 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
comparison
equal deleted inserted replaced
733:5f5e67aceb8c 734:56d70e546800
163 * This method overrides the XYChartGenerators zoomY method to include the 0 163 * This method overrides the XYChartGenerators zoomY method to include the 0
164 * value on the Q axis. 164 * value on the Q axis.
165 */ 165 */
166 @Override 166 @Override
167 protected boolean zoomY(XYPlot plot, ValueAxis axis, Range range, Range x) { 167 protected boolean zoomY(XYPlot plot, ValueAxis axis, Range range, Range x) {
168 boolean zoomin = super.zoomY(plot, axis, range, x); 168 if (plot.getRangeAxisIndex(axis) == 1) {
169 169 // we want the Q axis to start at 0 if no zooming has been done
170 // we want the Q axis to start at 0 if no zooming has been done 170 range = new Range(0d, range.getUpperBound());
171 if (!zoomin && plot.getRangeAxisIndex(axis) == 1) { 171 }
172 axis.setLowerBound(0d); 172
173 } 173 return super.zoomY(plot, axis, range, x);
174
175 return zoomin;
176 } 174 }
177 175
178 176
179 /** 177 /**
180 * This method inverts the x-axis based on the kilometer information of the 178 * This method inverts the x-axis based on the kilometer information of the

http://dive4elements.wald.intevation.org