Mercurial > dive4elements > river
changeset 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 | 11e9489eb1a7 |
children | 078934923acb |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeCurveGenerator.java |
diffstat | 3 files changed, 24 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Thu Jun 23 12:39:59 2011 +0000 +++ b/flys-artifacts/ChangeLog Thu Jun 23 13:42:47 2011 +0000 @@ -1,3 +1,13 @@ +2011-06-23 Ingo Weinzierl <ingo@intevation.de> + + flys/issue157 (Diagramm: Ursprung berechnete Abflusskurve) + + * src/main/java/de/intevation/flys/exports/DischargeCurveGenerator.java, + src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java: + Moved the method that adjusts the X-axis to include the "0" value from + ComputedDischargeCurveGenerator to DischargeCurveGenerator. Now, both + charts will include the "0" on the X-axis. + 2011-06-23 Sascha L. Teichmann <sascha.teichmann@intevation.de> * src/main/java/de/intevation/flys/artifacts/model/WQDay.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java Thu Jun 23 12:39:59 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java Thu Jun 23 13:42:47 2011 +0000 @@ -5,10 +5,8 @@ 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.chart.title.TextTitle; -import org.jfree.data.Range; import de.intevation.artifacts.Artifact; @@ -73,18 +71,6 @@ @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; - } - - - @Override public void doOut(Artifact artifact, Facet facet, Document attr) { String name = facet != null ? facet.getName() : null;
--- 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);