comparison flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java @ 1699:608859aa5a7e

Bugfix: #383 Add further y-axes before adjusting the ranges for each y-axis. flys-artifacts/trunk@2933 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 11 Oct 2011 10:38:54 +0000
parents 6e935087f6a1
children f708120cb7bc
comparison
equal deleted inserted replaced
1698:6e935087f6a1 1699:608859aa5a7e
131 addSubtitles(chart); 131 addSubtitles(chart);
132 adjustPlot(plot); 132 adjustPlot(plot);
133 localizeAxes(plot); 133 localizeAxes(plot);
134 134
135 removeEmptyRangeAxes(plot); 135 removeEmptyRangeAxes(plot);
136 adjustAxes(plot);
136 137
137 preparePointRanges(plot); 138 preparePointRanges(plot);
138 autoZoom(plot); 139 autoZoom(plot);
139 140
140 applyThemes(plot); 141 applyThemes(plot);
141 adjustAxes(plot);
142 142
143 return chart; 143 return chart;
144 } 144 }
145 145
146 146
310 logger.debug("Zoom to specified ranges."); 310 logger.debug("Zoom to specified ranges.");
311 311
312 Range xrange = getDomainAxisRange(); 312 Range xrange = getDomainAxisRange();
313 Range yrange = getValueAxisRange(); 313 Range yrange = getValueAxisRange();
314 314
315 zoomX(plot, plot.getDomainAxis(), xRanges.get(0), xrange);
316
315 for (int i = 0, num = plot.getRangeAxisCount(); i < num; i++) { 317 for (int i = 0, num = plot.getRangeAxisCount(); i < num; i++) {
316 Range[] ranges = new Range[] {
317 xRanges.get(0),
318 yRanges.get(Integer.valueOf(i)) };
319
320 if (i == 0) {
321 ValueAxis xaxis = plot.getDomainAxis();
322 zoomX(plot, xaxis, ranges[0], xrange);
323 }
324
325 ValueAxis yaxis = plot.getRangeAxis(i); 318 ValueAxis yaxis = plot.getRangeAxis(i);
326 319
327 if (yaxis == null) { 320 if (yaxis == null) {
321 logger.debug("Zoom problem: no Y Axis for index: " + i);
328 continue; 322 continue;
329 } 323 }
330 324
331 zoomY(plot, yaxis, ranges[1], yrange); 325 logger.debug("Prepare zoom settings for y axis at index: " + i);
326 zoomY(plot, yaxis, yRanges.get(Integer.valueOf(i)), yrange);
332 } 327 }
333 } 328 }
334 329
335 330
336 protected boolean zoomX(XYPlot plot, ValueAxis axis, Range range, Range x) { 331 protected boolean zoomX(XYPlot plot, ValueAxis axis, Range range, Range x) {

http://dive4elements.wald.intevation.org