comparison artifacts/src/main/java/org/dive4elements/river/exports/extreme/ExtremeWQCurveGenerator.java @ 6559:6791411ed1fc

issue1370: Force second axis if at gauge.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 10 Jul 2013 14:49:21 +0200
parents 0534ff91e499
children 1b35b2ddfc28
comparison
equal deleted inserted replaced
6558:c949681a0ccb 6559:6791411ed1fc
12 12
13 import org.apache.log4j.Logger; 13 import org.apache.log4j.Logger;
14 import org.jfree.chart.JFreeChart; 14 import org.jfree.chart.JFreeChart;
15 import org.jfree.chart.plot.Marker; 15 import org.jfree.chart.plot.Marker;
16 import org.jfree.chart.plot.ValueMarker; 16 import org.jfree.chart.plot.ValueMarker;
17 import org.jfree.chart.plot.XYPlot;
17 import org.jfree.chart.title.TextTitle; 18 import org.jfree.chart.title.TextTitle;
18 import org.jfree.data.xy.XYSeries; 19 import org.jfree.data.xy.XYSeries;
19 import org.w3c.dom.Document; 20 import org.w3c.dom.Document;
20 21
21 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet; 22 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
90 return true; 91 return true;
91 } 92 }
92 return false; 93 return false;
93 } 94 }
94 95
96 /** Overriden to show second axis also if no visible data present. */
97 @Override
98 protected void adjustAxes(XYPlot plot) {
99 super.adjustAxes(plot);
100 if (getCurrentGaugeDatum() != 0d) {
101 // Show the W[*m] axis even if there is no data.
102 plot.setRangeAxis(1, createYAxis(YAXIS.W.idx));
103 }
104 }
105
95 /** Do Extreme Curve nonextrapolated points out. */ 106 /** Do Extreme Curve nonextrapolated points out. */
96 protected void doExtremeCurveBaseOut(ArtifactAndFacet aaf, Document theme, boolean visible) { 107 protected void doExtremeCurveBaseOut(ArtifactAndFacet aaf, Document theme, boolean visible) {
97 logger.debug("doExtremeCurveBaseOut"); 108 logger.debug("doExtremeCurveBaseOut");
98 ExtremeCurveFacet facet = (ExtremeCurveFacet) aaf.getFacet(); 109 ExtremeCurveFacet facet = (ExtremeCurveFacet) aaf.getFacet();
99 Curve curve = (Curve) facet.getData(aaf.getArtifact(), context); 110 Curve curve = (Curve) facet.getData(aaf.getArtifact(), context);

http://dive4elements.wald.intevation.org