Mercurial > dive4elements > river
changeset 1733:ffab6de07dc5
In WDiff-diagram generation respect other.wkms facets (flood-prot, zus).
flys-artifacts/trunk@3018 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 18 Oct 2011 15:28:02 +0000 |
parents | 1a57027286ce |
children | 25d481cad4fb |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/WDifferencesCurveGenerator.java |
diffstat | 2 files changed, 35 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Tue Oct 18 15:26:14 2011 +0000 +++ b/flys-artifacts/ChangeLog Tue Oct 18 15:28:02 2011 +0000 @@ -1,3 +1,10 @@ +2011-10-18 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + Render zus and flood-protections in WDifferences-diagrams. + + * src/main/java/de/intevation/flys/exports/WDifferencesCurveGenerator.java: + Added basic respect of "other.wkms"- facets. + 2011-10-18 Felix Wolfsteller <felix.wolfsteller@intevation.de> Refactored WDifferencesState to deal with WKms of different
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/WDifferencesCurveGenerator.java Tue Oct 18 15:26:14 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/WDifferencesCurveGenerator.java Tue Oct 18 15:28:02 2011 +0000 @@ -145,6 +145,9 @@ else if (name.equals(LONGITUDINAL_W)) { doWOut((WQKms) f.getData(artifact, context), facet, attr, visible); } + else if (name.equals("other.wkms")) { + doWOut((WKms) f.getData(artifact, context), attr, visible); + } else { logger.warn("Unknown facet name: " + name); return; @@ -187,6 +190,31 @@ } + protected void doWOut(WKms wkms, Document theme, boolean visible) { + logger.debug("WDifferencesCurveGenerator.doWOut"); + + XYSeries series = new StyledXYSeries("Wurb", theme);//getSeriesName(wqkms, "W"), theme); + + int size = wkms.size(); + + for (int i = 0; i < size; i++) { + series.add(wkms.getKm(i), wkms.getW(i)); + } + + // Note: the only difference in the super-implementation + // (in LongitudinalSectionGenerator) is here (adds with + // addFirstAxisSeries() . + addSecondAxisSeries(series, visible); + + /* + TODO + if (needInvertAxis(wkms)) { + setInverted(true); + } + */ + } + + /** * Add items to dataseries which describes the differences. */