# HG changeset patch # User Ingo Weinzierl # Date 1318329534 0 # Node ID 608859aa5a7e665d0172e1f7d8beb24866959be2 # Parent 6e935087f6a19e47154c846c7154342a40070486 Bugfix: #383 Add further y-axes before adjusting the ranges for each y-axis. flys-artifacts/trunk@2933 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 6e935087f6a1 -r 608859aa5a7e flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Mon Oct 10 14:22:53 2011 +0000 +++ b/flys-artifacts/ChangeLog Tue Oct 11 10:38:54 2011 +0000 @@ -1,3 +1,11 @@ +2011-10-11 Ingo Weinzierl + + flys/issue383 (Zweite Y-Achse wird beim Zoomen/Verschieben nicht angepasst.) + + * src/main/java/de/intevation/flys/exports/XYChartGenerator.java: + Call adjustAxes() before applying zoom settings with autoZoom(). We need + to add new y-axes first before we adjust their ranges. + 2011-10-10 Sascha L. Teichmann * src/main/java/de/intevation/flys/exports/XYChartGenerator.java: diff -r 6e935087f6a1 -r 608859aa5a7e flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java --- a/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Mon Oct 10 14:22:53 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Tue Oct 11 10:38:54 2011 +0000 @@ -133,12 +133,12 @@ localizeAxes(plot); removeEmptyRangeAxes(plot); + adjustAxes(plot); preparePointRanges(plot); autoZoom(plot); applyThemes(plot); - adjustAxes(plot); return chart; } @@ -312,23 +312,18 @@ Range xrange = getDomainAxisRange(); Range yrange = getValueAxisRange(); - for (int i = 0, num = plot.getRangeAxisCount(); i < num; i++) { - Range[] ranges = new Range[] { - xRanges.get(0), - yRanges.get(Integer.valueOf(i)) }; + zoomX(plot, plot.getDomainAxis(), xRanges.get(0), xrange); - if (i == 0) { - ValueAxis xaxis = plot.getDomainAxis(); - zoomX(plot, xaxis, ranges[0], xrange); - } - + for (int i = 0, num = plot.getRangeAxisCount(); i < num; i++) { ValueAxis yaxis = plot.getRangeAxis(i); if (yaxis == null) { + logger.debug("Zoom problem: no Y Axis for index: " + i); continue; } - zoomY(plot, yaxis, ranges[1], yrange); + logger.debug("Prepare zoom settings for y axis at index: " + i); + zoomY(plot, yaxis, yRanges.get(Integer.valueOf(i)), yrange); } }