Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java @ 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 | fca46ce8e4f5 |
children | 7ac103a49e35 |
comparison
equal
deleted
inserted
replaced
7602:c50dbbe17950 | 7603:25bce6e8beea |
---|---|
1069 | 1069 |
1070 @Override | 1070 @Override |
1071 protected String getDefaultYAxisLabel(String axisName) { | 1071 protected String getDefaultYAxisLabel(String axisName) { |
1072 Set labelSet = axesLabels.get(diagramAttributes.getAxisIndex(axisName)); | 1072 Set labelSet = axesLabels.get(diagramAttributes.getAxisIndex(axisName)); |
1073 logger.debug("Labels for axis: " + labelSet); | 1073 logger.debug("Labels for axis: " + labelSet); |
1074 if (labelSet != null && labelSet.size() >= 2) { | 1074 if (labelSet != null && !labelSet.isEmpty()) { |
1075 String label = StringUtils.join(labelSet, ", "); | 1075 String label = StringUtils.join(labelSet, ", "); |
1076 Matcher units = UNIT_PATTERN.matcher(label); | 1076 Matcher units = UNIT_PATTERN.matcher(label); |
1077 if (units.find()) { | 1077 if (units.find()) { |
1078 String firstUnit = units.group(); | 1078 String firstUnit = units.group(); |
1079 label = units.replaceAll(""); | 1079 label = units.replaceAll(""); |