changeset 8390:e52a7daabe0f

For whatever reason (if any) facet descriptions with trailing whitespace are stripped from the legend.
author Tom Gottfried <tom@intevation.de>
date Tue, 07 Oct 2014 19:19:50 +0200
parents 1e1b08d033f4
children 6b12045ac372
files artifacts/src/main/java/org/dive4elements/river/artifacts/states/GaugeDischargeState.java artifacts/src/main/java/org/dive4elements/river/exports/process/DischargeProcessor.java artifacts/src/main/java/org/dive4elements/river/exports/process/HistoricalDischargeProcessor.java
diffstat 3 files changed, 5 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/GaugeDischargeState.java	Tue Oct 07 19:04:06 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/GaugeDischargeState.java	Tue Oct 07 19:19:50 2014 +0200
@@ -86,7 +86,6 @@
         String name = Resources.getMsg(
             meta,
             "chart.computed.discharge.curve.gauge",
-            "",
             args);
 
         return name;
@@ -162,9 +161,6 @@
 
                 facets.add(facet);
 
-                //facets.add(new DataFacet(CSV, "CSV data"));
-                //facets.add(new DataFacet(PDF, "PDF data"));
-
                 if (res.getReport().hasProblems()) {
                     facets.add(new ReportFacet());
                 }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/DischargeProcessor.java	Tue Oct 07 19:04:06 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/DischargeProcessor.java	Tue Oct 07 19:19:50 2014 +0200
@@ -71,7 +71,7 @@
             doDischargeOut(
                 generator,
                 bundle,
-                bundle.getFacetDescription(),
+                bundle.getFacetDescription().trim(),
                 theme,
                 visible);
         }
@@ -136,7 +136,6 @@
             log.debug("no gauge found");
             return;
         }
-
         generator.addAxisSeries(series, axisName, visible);
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/HistoricalDischargeProcessor.java	Tue Oct 07 19:04:06 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/HistoricalDischargeProcessor.java	Tue Oct 07 19:19:50 2014 +0200
@@ -77,8 +77,10 @@
     ) {
         CallContext context = generator.getCallContext();
         WQKms data = (WQKms)bundle.getData(context);
-        XYSeries series = new StyledXYSeries(bundle.getFacetDescription(),
-            theme);
+        XYSeries series = new StyledXYSeries(
+            bundle.getFacetDescription().trim(),
+            theme
+        );
         double[][] wqData = new double[2][data.size()];
         for (int i = 0; i < data.size(); i++) {
             wqData[0][i] = data.getQ(i);

http://dive4elements.wald.intevation.org