Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/WDifferencesCurveGenerator.java @ 1653:73794985a899
Enable auto-scaling axis for waterlevels in WDifference-plots.
flys-artifacts/trunk@2845 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 27 Sep 2011 14:37:18 +0000 |
parents | 614ffddb860e |
children | 03fbf1b30e72 |
comparison
equal
deleted
inserted
replaced
1652:46a2a5dc98b7 | 1653:73794985a899 |
---|---|
4 | 4 |
5 import org.jfree.chart.JFreeChart; | 5 import org.jfree.chart.JFreeChart; |
6 import org.jfree.chart.plot.XYPlot; | 6 import org.jfree.chart.plot.XYPlot; |
7 import org.jfree.chart.title.TextTitle; | 7 import org.jfree.chart.title.TextTitle; |
8 import org.jfree.data.xy.XYSeries; | 8 import org.jfree.data.xy.XYSeries; |
9 import org.jfree.data.Range; | |
9 | 10 |
10 import org.w3c.dom.Document; | 11 import org.w3c.dom.Document; |
11 | 12 |
12 import de.intevation.artifacts.Artifact; | 13 import de.intevation.artifacts.Artifact; |
13 | 14 |
49 | 50 |
50 // TODO proper i18n. | 51 // TODO proper i18n. |
51 public static final String I18N_CHART_TITLE_DEFAULT = "W-Differenzen"; | 52 public static final String I18N_CHART_TITLE_DEFAULT = "W-Differenzen"; |
52 public static final String I18N_XAXIS_LABEL_DEFAULT = "km"; | 53 public static final String I18N_XAXIS_LABEL_DEFAULT = "km"; |
53 public static final String I18N_YAXIS_LABEL_DEFAULT = "W [m]"; | 54 public static final String I18N_YAXIS_LABEL_DEFAULT = "W [m]"; |
55 public static final String I18N_2YAXIS_LABEL_DEFAULT = "W [NN + m]"; | |
54 | 56 |
55 | 57 |
56 /** | 58 /** |
57 * Add a subtitle to Chart. | 59 * Add a subtitle to Chart. |
58 * @param chart Chart to add subtitle to. | 60 * @param chart Chart to add subtitle to. |
178 if (DataUtil.guessWaterIncreasing(wkms)) { | 180 if (DataUtil.guessWaterIncreasing(wkms)) { |
179 setInverted(true); | 181 setInverted(true); |
180 } | 182 } |
181 } | 183 } |
182 | 184 |
183 | 185 /** |
186 * Disable Longitudinals behaviour to include "0" in the Q axis. | |
187 * @param range range with which to look up upper bound. | |
188 * @return range to be used for "auto-scaling" axis. | |
189 */ | |
190 @Override | |
191 protected Range createSecondAxisRange(Range range) { | |
192 return new Range(range.getLowerBound(), range.getUpperBound()); | |
193 } | |
194 | |
195 | |
184 /** | 196 /** |
185 * | 197 * |
186 */ | 198 */ |
187 @Override | 199 @Override |
188 public JFreeChart generateChart() { | 200 public JFreeChart generateChart() { |