comparison flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java @ 1687:19c4cf5163e8

Take care on empty ranges (null) while preparing single point ranges. flys-artifacts/trunk@2905 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 07 Oct 2011 13:33:10 +0000
parents e8d1e531687a
children 7eb9015489b0
comparison
equal deleted inserted replaced
1686:e8d1e531687a 1687:19c4cf5163e8
265 private void preparePointRanges(XYPlot plot) { 265 private void preparePointRanges(XYPlot plot) {
266 for (int i = 0, num = plot.getDomainAxisCount(); i < num; i++) { 266 for (int i = 0, num = plot.getDomainAxisCount(); i < num; i++) {
267 Integer key = new Integer(i); 267 Integer key = new Integer(i);
268 268
269 Range r = xRanges.get(key); 269 Range r = xRanges.get(key);
270 if (r.getLowerBound() == r.getUpperBound()) { 270 if (r != null && r.getLowerBound() == r.getUpperBound()) {
271 xRanges.put(key, expandRange(r, 5)); 271 xRanges.put(key, expandRange(r, 5));
272 } 272 }
273 } 273 }
274 274
275 for (int i = 0, num = plot.getRangeAxisCount(); i < num; i++) { 275 for (int i = 0, num = plot.getRangeAxisCount(); i < num; i++) {
276 Integer key = new Integer(i); 276 Integer key = new Integer(i);
277 277
278 Range r = yRanges.get(key); 278 Range r = yRanges.get(key);
279 if (r.getLowerBound() == r.getUpperBound()) { 279 if (r != null && r.getLowerBound() == r.getUpperBound()) {
280 yRanges.put(key, expandRange(r, 5)); 280 yRanges.put(key, expandRange(r, 5));
281 } 281 }
282 } 282 }
283 } 283 }
284 284

http://dive4elements.wald.intevation.org