comparison flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java @ 2605:15a3684c6bce

#366 Display correct descriptions in legend panel of charts. flys-artifacts/trunk@4183 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 29 Mar 2012 11:09:26 +0000
parents e123c5643f23
children 5652a851f1b4
comparison
equal deleted inserted replaced
2604:83c117b639f9 2605:15a3684c6bce
107 } 107 }
108 108
109 Facet facet = artifactFacet.getFacet(); 109 Facet facet = artifactFacet.getFacet();
110 110
111 if (name.equals(COMPUTED_DISCHARGE_Q)) { 111 if (name.equals(COMPUTED_DISCHARGE_Q)) {
112 doQOut((WQKms) artifactFacet.getData(context), facet, attr, visible); 112 doQOut((WQKms) artifactFacet.getData(context), artifactFacet, attr, visible);
113 } 113 }
114 else if (name.equals(STATIC_WQ)) { 114 else if (name.equals(STATIC_WQ)) {
115 doWQOut(artifactFacet.getData(context), facet, attr, visible); 115 doWQOut(artifactFacet.getData(context), artifactFacet, attr, visible);
116 } 116 }
117 else if (name.equals(STATIC_WQ_ANNOTATIONS)) { 117 else if (name.equals(STATIC_WQ_ANNOTATIONS)) {
118 doWQAnnotations( 118 doWQAnnotations(
119 artifactFacet.getData(context), 119 artifactFacet.getData(context),
120 artifactFacet, 120 artifactFacet,
151 /** 151 /**
152 * Add WQ Data to plot. 152 * Add WQ Data to plot.
153 * @param wqkms data as double[][] 153 * @param wqkms data as double[][]
154 */ 154 */
155 protected void doWQOut( 155 protected void doWQOut(
156 Object wqkms, 156 Object wqkms,
157 Facet facet, 157 ArtifactAndFacet aaf,
158 Document theme, 158 Document theme,
159 boolean visible 159 boolean visible
160 ) { 160 ) {
161 double [][] data = (double [][]) wqkms; 161 double [][] data = (double [][]) wqkms;
162 162
163 XYSeries series = new StyledXYSeries(facet.getDescription(), theme); 163 XYSeries series = new StyledXYSeries(aaf.getFacetDescription(), theme);
164 StyledSeriesBuilder.addPoints(series, data); 164 StyledSeriesBuilder.addPoints(series, data);
165 165
166 addAxisSeries(series, YAXIS.W.idx, visible); 166 addAxisSeries(series, YAXIS.W.idx, visible);
167 } 167 }
168 168
171 * Add Q-Series to plot. 171 * Add Q-Series to plot.
172 * @param wqkms actual data 172 * @param wqkms actual data
173 * @param theme theme to use. 173 * @param theme theme to use.
174 */ 174 */
175 protected void doQOut( 175 protected void doQOut(
176 WQKms wqkms, 176 WQKms wqkms,
177 Facet facet, 177 ArtifactAndFacet aaf,
178 Document theme, 178 Document theme,
179 boolean visible 179 boolean visible
180 ) { 180 ) {
181 XYSeries series = new StyledXYSeries(facet.getDescription(), theme); 181 XYSeries series = new StyledXYSeries(aaf.getFacetDescription(), theme);
182 StyledSeriesBuilder.addPointsQW(series, wqkms); 182 StyledSeriesBuilder.addPointsQW(series, wqkms);
183 183
184 addAxisSeries(series, YAXIS.W.idx, visible); 184 addAxisSeries(series, YAXIS.W.idx, visible);
185 } 185 }
186 186

http://dive4elements.wald.intevation.org