Mercurial > dive4elements > river
changeset 6469:cce8c5f59053
ExtremeWQCurveGenerator: Fix axis labels.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 27 Jun 2013 10:45:41 +0200 |
parents | 5de3388c5978 |
children | 74c1b052ad28 |
files | artifacts/src/main/java/org/dive4elements/river/exports/extreme/ExtremeWQCurveGenerator.java |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/extreme/ExtremeWQCurveGenerator.java Thu Jun 27 10:44:59 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/extreme/ExtremeWQCurveGenerator.java Thu Jun 27 10:45:41 2013 +0200 @@ -200,7 +200,13 @@ @Override protected String getDefaultYAxisLabel(int pos) { - return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT); + D4EArtifact flys = (D4EArtifact) master; + + String unit = RiverUtils.getRiver(flys).getWstUnit().getName(); + if (pos == 0 && getCurrentGaugeDatum() != 0) + unit = "cm"; + + return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT, new Object[] { unit }); } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :