Mercurial > dive4elements > river
changeset 3312:41a7b171bd59
SQ relation: Suppress data points with values <= 0 because they kill JFreeChart's log/log diagrams.
flys-artifacts/trunk@5001 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 13 Jul 2012 16:11:13 +0000 |
parents | 53ad37c8abe3 |
children | 1a9ab048573a |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/sq/SQRelationGenerator.java |
diffstat | 2 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Fri Jul 13 16:01:18 2012 +0000 +++ b/flys-artifacts/ChangeLog Fri Jul 13 16:11:13 2012 +0000 @@ -1,3 +1,9 @@ +2012-07-13 Sascha L. Teichmann <sascha.teichmann@intevation.de> + + * src/main/java/de/intevation/flys/exports/sq/SQRelationGenerator.java: + Suppress data points with values <= 0 because they kill JFreeChart's + log/log diagrams. + 2012-07-13 Sascha L. Teichmann <sascha.teichmann@intevation.de> * src/main/java/de/intevation/flys/artifacts/model/sq/MeasurementFactory.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/sq/SQRelationGenerator.java Fri Jul 13 16:01:18 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/sq/SQRelationGenerator.java Fri Jul 13 16:11:13 2012 +0000 @@ -180,7 +180,11 @@ XYSeries series = new StyledXYSeries(desc, attr); for (SQ sq: sqs) { - series.add(sq.getQ(), sq.getS()); + double q = sq.getQ(); + double s = sq.getS(); + if (s > 0d && q > 0d) { + series.add(q, s, false); + } } if (logger.isDebugEnabled()) {