Mercurial > dive4elements > river
changeset 2110:7c5bcb0e03e1
Prevent range collapsing when negative values are given.
flys-artifacts/trunk@3673 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 13 Jan 2012 11:08:41 +0000 |
parents | 60e3bf470c5b |
children | 85d31c2620e5 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Thu Jan 12 16:59:52 2012 +0000 +++ b/flys-artifacts/ChangeLog Fri Jan 13 11:08:41 2012 +0000 @@ -1,3 +1,8 @@ +2011-01-13 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + * src/main/java/de/intevation/flys/exports/XYChartGenerator.java: + (expandRange): Prevent collapse due to negative values. + 2012-01-12 Raimund Renkert <raimund.renkert@intevation.de> * doc/conf/artifacts/map.xml,
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Thu Jan 12 16:59:52 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Fri Jan 13 11:08:41 2012 +0000 @@ -800,7 +800,7 @@ } double value = range.getLowerBound(); - double expand = value / 100 * percent; + double expand = Math.abs(value / 100 * percent); return expand != 0 ? new Range(value-expand, value+expand)