Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeCurveGenerator.java @ 728:56bcf56b1fe0
#157 Both types of discharge curves will now include the '0' value on the x-axis.
flys-artifacts/trunk@2218 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 23 Jun 2011 13:42:47 +0000 |
parents | 8900966ad945 |
children | e95e6df97e55 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeCurveGenerator.java Thu Jun 23 12:39:59 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeCurveGenerator.java Thu Jun 23 13:42:47 2011 +0000 @@ -8,7 +8,9 @@ import org.w3c.dom.Document; import org.jfree.chart.JFreeChart; +import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.plot.XYPlot; +import org.jfree.data.Range; import org.jfree.data.xy.DefaultXYDataset; import de.intevation.artifacts.Artifact; @@ -85,6 +87,18 @@ } + @Override + protected boolean zoomX(XYPlot plot, ValueAxis axis, Range range, Range x) { + boolean zoomin = super.zoom(plot, axis, range, x); + + if (!zoomin) { + axis.setLowerBound(0d); + } + + return zoomin; + } + + protected void addDatasets(JFreeChart chart) { XYPlot plot = (XYPlot) chart.getPlot(); plot.setDataset(0, dataset);