Mercurial > dive4elements > river
changeset 8317:c04c66839288
Do not die if values <= 0 are tried to be plotted on log axis.
author | "Tom Gottfried <tom@intevation.de>" |
---|---|
date | Wed, 24 Sep 2014 16:24:32 +0200 |
parents | c086b06b81e5 |
children | d15dafd41b41 |
files | artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator2.java |
diffstat | 1 files changed, 11 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator2.java Wed Sep 24 13:29:34 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator2.java Wed Sep 24 16:24:32 2014 +0200 @@ -1231,14 +1231,19 @@ // Add contained datasets, mapping to axis. for (XYDataset dataset: axisDataset.getDatasets()) { - plot.setDataset(datasetIndex, dataset); - plot.mapDatasetToRangeAxis(datasetIndex, axisIndex); + try { + plot.setDataset(datasetIndex, dataset); + plot.mapDatasetToRangeAxis(datasetIndex, axisIndex); - applyThemes(plot, dataset, - datasetIndex, - axisDataset.isArea(dataset)); + applyThemes(plot, dataset, + datasetIndex, + axisDataset.isArea(dataset)); - datasetIndex++; + datasetIndex++; + } + catch (RuntimeException re) { + log.error(re); + } } axisDataset.setPlotAxisIndex(axisIndex);