comparison gnv-artifacts/src/main/java/de/intevation/gnv/chart/TimeSeriesChart.java @ 327:22a6493e8460

New options in chart template: visibility of lines and points in charts and point's size. gnv-artifacts/trunk@393 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 02 Dec 2009 10:50:12 +0000
parents 63f8b3fb7d9a
children 42a5269636eb
comparison
equal deleted inserted replaced
326:37847d724fc9 327:22a6493e8460
41 Collection parameters, 41 Collection parameters,
42 Collection measurements, 42 Collection measurements,
43 Collection dates, 43 Collection dates,
44 Collection result, 44 Collection result,
45 Collection timeGaps, 45 Collection timeGaps,
46 Locale locale 46 Locale locale,
47 boolean linesVisible,
48 boolean shapesVisible
47 ) { 49 ) {
48 this.labels = labels; 50 this.labels = labels;
49 this.theme = theme; 51 this.theme = theme;
50 this.parameters = parameters; 52 this.parameters = parameters;
51 this.measurements = measurements; 53 this.measurements = measurements;
52 this.dates = dates; 54 this.dates = dates;
53 this.resultSet = result; 55 this.resultSet = result;
54 this.timeGaps = timeGaps; 56 this.timeGaps = timeGaps;
55 this.locale = locale; 57 this.locale = locale;
56 this.PLOT_ORIENTATION = PlotOrientation.VERTICAL; 58 this.PLOT_ORIENTATION = PlotOrientation.VERTICAL;
59 this.linesVisible = linesVisible;
60 this.shapesVisible = shapesVisible;
57 } 61 }
58 62
59 63
60 public JFreeChart generateChart() { 64 public JFreeChart generateChart() {
61 log.debug("generate timeseries chart"); 65 log.debug("generate timeseries chart");
104 ) { 108 ) {
105 log.debug("prepare data/plot for next dataset"); 109 log.debug("prepare data/plot for next dataset");
106 110
107 if(series != null) { 111 if(series != null) {
108 addSeries(series, idx); 112 addSeries(series, idx);
109 prepareAxis(((String)series.getKey()), idx++); 113 prepareAxis(((String)series.getKey()), idx);
114 adjustRenderer(idx++, linesVisible, shapesVisible);
110 } 115 }
111 116
112 // prepare variables for next plot 117 // prepare variables for next plot
113 breakPoint1 = row.getString("GROUP1"); 118 breakPoint1 = row.getString("GROUP1");
114 breakPoint2 = row.getString("GROUP2"); 119 breakPoint2 = row.getString("GROUP2");
128 } 133 }
129 134
130 // add the last dataset if existing to plot and prepare its axis 135 // add the last dataset if existing to plot and prepare its axis
131 addSeries(series, idx); 136 addSeries(series, idx);
132 137
133 if (series != null) 138 if (series != null) {
134 prepareAxis(((String)series.getKey()), idx++); 139 prepareAxis(((String)series.getKey()), idx);
140 adjustRenderer(idx++, linesVisible, shapesVisible);
141 }
135 } 142 }
136 143
137 144
138 protected void addValue(Result row, Series series) { 145 protected void addValue(Result row, Series series) {
139 // TODO look for gaps between two values 146 // TODO look for gaps between two values

http://dive4elements.wald.intevation.org