Mercurial > dive4elements > river
changeset 7095:bdadffad35b1
issue1493: Don't let NaNs slip through csv export.
Use the empty String instead.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Mon, 23 Sep 2013 11:37:13 +0200 |
parents | 99527ef3f151 |
children | 3c7471b929d1 |
files | artifacts/src/main/java/org/dive4elements/river/exports/ChartExportHelper.java |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ChartExportHelper.java Mon Sep 23 11:24:17 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ChartExportHelper.java Mon Sep 23 11:37:13 2013 +0200 @@ -349,7 +349,9 @@ String yString; try { xString = format.format(data.getX(i, j)); - yString = format.format(data.getY(i, j)); + yString = java.lang.Double.isNaN(data.getYValue(i, j)) + ? "" + : format.format(data.getY(i, j)); } catch (NumberFormatException nfe) { xString = data.getX(i, j).toString();