comparison flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java @ 3063:33c167d6fff6

Move marker generation to XYChartGenerator flys-artifacts/trunk@4643 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Christian Lins <christian.lins@intevation.de>
date Tue, 12 Jun 2012 13:20:48 +0000
parents 4b6fb6d91192
children 478e8d9d88ba
comparison
equal deleted inserted replaced
3062:7660cfe5e8f6 3063:33c167d6fff6
79 private class XYAxisDataset implements AxisDataset { 79 private class XYAxisDataset implements AxisDataset {
80 /** Symbolic integer, but also coding the priority (0 goes first). */ 80 /** Symbolic integer, but also coding the priority (0 goes first). */
81 protected int axisSymbol; 81 protected int axisSymbol;
82 /** List of assigned datasets (in order). */ 82 /** List of assigned datasets (in order). */
83 protected List<XYDataset> datasets; 83 protected List<XYDataset> datasets;
84 /** List of assigned vertical markers */
85 protected List<Marker> domainMarkers = new ArrayList<Marker>();
84 /** Range to use to include all given datasets. */ 86 /** Range to use to include all given datasets. */
85 protected Range range; 87 protected Range range;
86 /** Index of axis in plot. */ 88 /** Index of axis in plot. */
87 protected int plotAxisIndex; 89 protected int plotAxisIndex;
88 90
232 //debugAxis(plot); 234 //debugAxis(plot);
233 235
234 addDatasets(plot); 236 addDatasets(plot);
235 237
236 //debugDatasets(plot); 238 //debugDatasets(plot);
239
240 addMarkers(plot);
237 241
238 recoverEmptyPlot(plot); 242 recoverEmptyPlot(plot);
239 preparePointRanges(plot); 243 preparePointRanges(plot);
240 244
241 //debugAxis(plot); 245 //debugAxis(plot);
351 355
352 if (!visible) { 356 if (!visible) {
353 // Do this also when not visible to have axis scaled by default such 357 // Do this also when not visible to have axis scaled by default such
354 // that every data-point could be seen (except for annotations). 358 // that every data-point could be seen (except for annotations).
355 axisDataset.includeYRange(series); 359 axisDataset.includeYRange(series);
360 }
361 }
362
363
364 /**
365 * Add the given vertical marker to the chart.
366 */
367 public void addDomainMarker(Marker marker) {
368 if (marker == null) {
369 return null;
370 }
371
372 this.domainMarkers.add(marker);
373 }
374
375
376 protected void addMarkers(XYPlot plot) {
377 for(Marker marker : domainMarkers) {
378 plot.addDomainMarker(plot);
356 } 379 }
357 } 380 }
358 381
359 382
360 /** 383 /**

http://dive4elements.wald.intevation.org