Mercurial > dive4elements > river
comparison 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 |
comparison
equal
deleted
inserted
replaced
727:11e9489eb1a7 | 728:56bcf56b1fe0 |
---|---|
6 import org.apache.log4j.Logger; | 6 import org.apache.log4j.Logger; |
7 | 7 |
8 import org.w3c.dom.Document; | 8 import org.w3c.dom.Document; |
9 | 9 |
10 import org.jfree.chart.JFreeChart; | 10 import org.jfree.chart.JFreeChart; |
11 import org.jfree.chart.axis.ValueAxis; | |
11 import org.jfree.chart.plot.XYPlot; | 12 import org.jfree.chart.plot.XYPlot; |
13 import org.jfree.data.Range; | |
12 import org.jfree.data.xy.DefaultXYDataset; | 14 import org.jfree.data.xy.DefaultXYDataset; |
13 | 15 |
14 import de.intevation.artifacts.Artifact; | 16 import de.intevation.artifacts.Artifact; |
15 | 17 |
16 import de.intevation.artifactdatabase.state.Facet; | 18 import de.intevation.artifactdatabase.state.Facet; |
80 } | 82 } |
81 | 83 |
82 | 84 |
83 protected String getYAxisLabel() { | 85 protected String getYAxisLabel() { |
84 return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT); | 86 return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT); |
87 } | |
88 | |
89 | |
90 @Override | |
91 protected boolean zoomX(XYPlot plot, ValueAxis axis, Range range, Range x) { | |
92 boolean zoomin = super.zoom(plot, axis, range, x); | |
93 | |
94 if (!zoomin) { | |
95 axis.setLowerBound(0d); | |
96 } | |
97 | |
98 return zoomin; | |
85 } | 99 } |
86 | 100 |
87 | 101 |
88 protected void addDatasets(JFreeChart chart) { | 102 protected void addDatasets(JFreeChart chart) { |
89 XYPlot plot = (XYPlot) chart.getPlot(); | 103 XYPlot plot = (XYPlot) chart.getPlot(); |