Mercurial > dive4elements > river
diff 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 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/WDifferencesCurveGenerator.java Tue Sep 27 14:03:06 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/WDifferencesCurveGenerator.java Tue Sep 27 14:37:18 2011 +0000 @@ -6,6 +6,7 @@ import org.jfree.chart.plot.XYPlot; import org.jfree.chart.title.TextTitle; import org.jfree.data.xy.XYSeries; +import org.jfree.data.Range; import org.w3c.dom.Document; @@ -51,6 +52,7 @@ public static final String I18N_CHART_TITLE_DEFAULT = "W-Differenzen"; public static final String I18N_XAXIS_LABEL_DEFAULT = "km"; public static final String I18N_YAXIS_LABEL_DEFAULT = "W [m]"; + public static final String I18N_2YAXIS_LABEL_DEFAULT = "W [NN + m]"; /** @@ -180,7 +182,17 @@ } } + /** + * Disable Longitudinals behaviour to include "0" in the Q axis. + * @param range range with which to look up upper bound. + * @return range to be used for "auto-scaling" axis. + */ + @Override + protected Range createSecondAxisRange(Range range) { + return new Range(range.getLowerBound(), range.getUpperBound()); + } + /** * */