Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/exports/DurationCurveGenerator.java @ 2421:59047dfed8be
Picked rev4061 from trunk.
flys-artifacts/tags/2.6.1@4064 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 16 Feb 2012 12:35:51 +0000 |
parents | 1fcaeced48f2 |
children | bece6f604899 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/DurationCurveGenerator.java Thu Feb 16 11:54:10 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/DurationCurveGenerator.java Thu Feb 16 12:35:51 2012 +0000 @@ -161,6 +161,27 @@ } + /** + * This method overrides the method in the parent class to set the lower + * bounds of the Q axis to 0. This axis should never display negative + * values on its own. + */ + @Override + protected boolean zoomY(XYPlot plot, ValueAxis axis, Range range, Range x) { + boolean zoomin = super.zoom(plot, axis, range, x); + + if (!zoomin && axis instanceof IdentifiableNumberAxis) { + String id = ((IdentifiableNumberAxis) axis).getId(); + + if (YAXIS.Q.toString().equals(id)) { + axis.setLowerBound(0d); + } + } + + return zoomin; + } + + @Override public void doOut( ArtifactAndFacet artifactFacet,