Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java @ 8147:8ad0b7bc3e73
Make Logarithmic axis immun against negative values (not throwing Exceptions in that case).
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Wed, 27 Aug 2014 16:47:38 +0200 |
parents | 45cced06490c |
children | e4606eae8ea5 |
comparison
equal
deleted
inserted
replaced
8146:ce35bdf3d750 | 8147:8ad0b7bc3e73 |
---|---|
377 protected NumberAxis createXAxis(String label) { | 377 protected NumberAxis createXAxis(String label) { |
378 boolean logarithmic = (Boolean)diagramAttributes.getDomainAxis(). | 378 boolean logarithmic = (Boolean)diagramAttributes.getDomainAxis(). |
379 isLog().evaluate((D4EArtifact)getMaster(), context); | 379 isLog().evaluate((D4EArtifact)getMaster(), context); |
380 | 380 |
381 if (logarithmic) { | 381 if (logarithmic) { |
382 return new LogarithmicAxis(label); | 382 LogarithmicAxis la = new LogarithmicAxis(label); |
383 } else { | 383 la.setStrictValuesFlag(false); |
384 return new NumberAxis(label); | 384 la.setAllowNegativesFlag(true); |
385 } | 385 return la; |
386 } | |
387 return new NumberAxis(label); | |
386 } | 388 } |
387 | 389 |
388 | 390 |
389 @Override | 391 @Override |
390 protected Series getSeriesOf(XYDataset dataset, int idx) { | 392 protected Series getSeriesOf(XYDataset dataset, int idx) { |