[PATCH 1 of 2] issue1490: Translate other points as well, when at gauge
Wald Commits
scm-commit at wald.intevation.org
Tue Oct 8 11:57:57 CEST 2013
# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1381225768 -7200
# Node ID a36e26abcf545ea265911a37a1c6a15c2677d734
# Parent 0e6b399e72f9a89acfb3a8034784d2a8f43f4e99
issue1490: Translate other points as well, when at gauge.
diff -r 0e6b399e72f9 -r a36e26abcf54 artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixWQCurveGenerator.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixWQCurveGenerator.java Tue Oct 08 09:26:09 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixWQCurveGenerator.java Tue Oct 08 11:49:28 2013 +0200
@@ -646,17 +646,24 @@
DateFormat dateFormat = DateFormat.getDateInstance(
DateFormat.SHORT);
+ double gaugeDatum = getCurrentGaugeDatum();
+ double factor = (gaugeDatum == 0d) ? 1d : 100d;
for (QWI qw: qws) {
- series.add(qw.getQ(), qw.getW(), false);
+ series.add(qw.getQ(), factor*(qw.getW()-gaugeDatum), false);
XYTextAnnotation anno = new CollisionFreeXYTextAnnotation(
dateFormat.format(qw.getDate()),
qw.getQ(),
- qw.getW());
+ factor*(qw.getW()-gaugeDatum));
textAnnos.add(anno);
}
- addAxisSeries(series, YAXIS.W.idx, visible);
+ if (gaugeDatum == 0d) {
+ addAxisSeries(series, YAXIS.W.idx, visible);
+ }
+ else {
+ addAxisSeries(series, YAXIS.WCm.idx, visible);
+ }
if (visible && theme.parseShowPointLabel()) {
RiverAnnotation flysAnno =
new RiverAnnotation(null, null, null, theme);
More information about the Dive4elements-commits
mailing list