Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/exports/DurationCurveGenerator.java @ 2605:15a3684c6bce
#366 Display correct descriptions in legend panel of charts.
flys-artifacts/trunk@4183 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 29 Mar 2012 11:09:26 +0000 |
parents | bece6f604899 |
children | a7a4d3b2e2b0 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/DurationCurveGenerator.java Wed Mar 28 12:18:44 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/DurationCurveGenerator.java Thu Mar 29 11:09:26 2012 +0000 @@ -199,10 +199,18 @@ } if (name.equals(DURATION_W)) { - doWOut((WQDay) artifactFacet.getData(context), attr, visible); + doWOut( + (WQDay) artifactFacet.getData(context), + artifactFacet, + attr, + visible); } else if (name.equals(DURATION_Q)) { - doQOut((WQDay) artifactFacet.getData(context), attr, visible); + doQOut( + (WQDay) artifactFacet.getData(context), + artifactFacet, + attr, + visible); } else if (name.equals(DURATION_MAINVALUES_Q) || name.equals(MAINVALUES_Q) @@ -234,12 +242,15 @@ * @param wqdays The WQDay store that contains the Ws. * @param theme */ - protected void doWOut(WQDay wqdays, Document theme, boolean visible) { + protected void doWOut( + WQDay wqdays, + ArtifactAndFacet aaf, + Document theme, + boolean visible + ) { logger.debug("DurationCurveGenerator.doWOut"); - // TODO find the correct series name - XYSeries series = new StyledXYSeries( - getSeriesName(getRiverName(), DURATION_W), theme); + XYSeries series = new StyledXYSeries(aaf.getFacetDescription(), theme); int size = wqdays.size(); for (int i = 0; i < size; i++) { @@ -259,12 +270,15 @@ * @param wqdays The WQDay store that contains the Qs. * @param theme */ - protected void doQOut(WQDay wqdays, Document theme, boolean visible) { + protected void doQOut( + WQDay wqdays, + ArtifactAndFacet aaf, + Document theme, + boolean visible + ) { logger.debug("DurationCurveGenerator.doQOut"); - // TODO find the correct series name - XYSeries series = new StyledXYSeries( - getSeriesName(getRiverName(), DURATION_Q), theme); + XYSeries series = new StyledXYSeries(aaf.getFacetDescription(), theme); int size = wqdays.size(); for (int i = 0; i < size; i++) {