comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/FixingsKMChartService.java @ 2621:f0cc556eda29

FixingsKMChartService.java: Small fixes. flys-artifacts/trunk@4206 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 05 Apr 2012 18:25:48 +0000
parents cc0fa1798a3c
children 5642a83420f2
comparison
equal deleted inserted replaced
2620:cc0fa1798a3c 2621:f0cc556eda29
211 211
212 DefaultXYDataset dataset = new DefaultXYDataset(); 212 DefaultXYDataset dataset = new DefaultXYDataset();
213 213
214 dataset.addSeries( 214 dataset.addSeries(
215 "Fixierungen", // TODO: i18n 215 "Fixierungen", // TODO: i18n
216 new double [][] { ws.toNativeArray(), qs.toNativeArray() }); 216 new double [][] { qs.toNativeArray(), ws.toNativeArray() });
217 217
218 JFreeChart chart = ChartFactory.createXYLineChart( 218 JFreeChart chart = ChartFactory.createScatterPlot(
219 "Fixierungen " + river + ": km " + km, // TODO: i18n 219 "Fixierungen " + river + ": km " + km, // TODO: i18n
220 "Q", // TODO: i18n 220 "Q", // TODO: i18n
221 "W", // TODO: i18n 221 "W", // TODO: i18n
222 null, 222 dataset,
223 PlotOrientation.VERTICAL, 223 PlotOrientation.VERTICAL,
224 true, 224 true,
225 true, 225 false,
226 false); 226 false);
227 227
228 XYPlot plot = chart.getXYPlot(); 228 //XYPlot plot = chart.getXYPlot();
229 229
230 plot.setDataset(dataset); 230 //plot.setDataset(dataset);
231 231
232 ChartUtilities.applyCurrentTheme(chart); 232 ChartUtilities.applyCurrentTheme(chart);
233 233
234 return chart; 234 return chart;
235 } 235 }
241 return null; 241 return null;
242 } 242 }
243 243
244 String river = ((Element)rivers.item(0)).getAttribute("name"); 244 String river = ((Element)rivers.item(0)).getAttribute("name");
245 245
246 return river.length() == 0 ? river : null; 246 return river.length() > 0 ? river : null;
247 } 247 }
248 248
249 protected static Double getKM(Document input) { 249 protected static Double getKM(Document input) {
250 NodeList kms = input.getElementsByTagName("km"); 250 NodeList kms = input.getElementsByTagName("km");
251 251

http://dive4elements.wald.intevation.org