Do not show errors in pie chart if number == 0.
@@ -26,9 +26,12 @@ public class SeverityPieChart {
ImmutableSet<Severity> predefinedSeverities = Severity.getPredefinedValues();
for (Severity severity : predefinedSeverities) {
- model.add(new PieData(LocalizedSeverity.getLocalizedString(severity), report.getSizeOf(severity)),
+ int total = report.getSizeOf(severity);
+ if (total > 0 || !severity.equals(Severity.ERROR)) {
+ model.add(new PieData(LocalizedSeverity.getLocalizedString(severity), total),
SeverityPalette.getColor(severity));
}
+ }
return model;
}
