changeset 7603:25bce6e8beea

(issue1225) Use label code also when only one item is present
author Andre Heinecke <aheinecke@intevation.de>
date Mon, 25 Nov 2013 17:40:47 +0100
parents c50dbbe17950
children 05549a84ee83
files artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java	Wed Nov 27 14:55:25 2013 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java	Mon Nov 25 17:40:47 2013 +0100
@@ -1071,7 +1071,7 @@
     protected String getDefaultYAxisLabel(String axisName) {
         Set labelSet = axesLabels.get(diagramAttributes.getAxisIndex(axisName));
         logger.debug("Labels for axis: " + labelSet);
-        if (labelSet != null && labelSet.size() >= 2) {
+        if (labelSet != null && !labelSet.isEmpty()) {
             String label = StringUtils.join(labelSet, ", ");
             Matcher units = UNIT_PATTERN.matcher(label);
             if (units.find()) {

http://dive4elements.wald.intevation.org