changeset 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 ce35bdf3d750
children eb48b244921d
files artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java	Wed Aug 27 15:09:45 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java	Wed Aug 27 16:47:38 2014 +0200
@@ -379,10 +379,12 @@
             isLog().evaluate((D4EArtifact)getMaster(), context);
 
         if (logarithmic) {
-            return new LogarithmicAxis(label);
-        } else {
-            return new NumberAxis(label);
+            LogarithmicAxis la = new LogarithmicAxis(label);
+            la.setStrictValuesFlag(false);
+            la.setAllowNegativesFlag(true);
+            return la;
         }
+        return new NumberAxis(label);
     }
 
 

http://dive4elements.wald.intevation.org