diff --git a/src/fr/devinsy/statoolinfos/htmlize/ChartHtmlizer.java b/src/fr/devinsy/statoolinfos/htmlize/ChartHtmlizer.java index c2c3c71..7fa61ed 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/ChartHtmlizer.java +++ b/src/fr/devinsy/statoolinfos/htmlize/ChartHtmlizer.java @@ -913,19 +913,19 @@ public class ChartHtmlizer BarChart chart = new BarChart("Entrées/Sorties"); // chart.setStacked(true); + chart.addDataset("Sorties"); + PathPropertyList values = federation.getByYearPrefix("metrics.members.out").sortByPath(); + for (PathProperty property : values) + { + chart.add(0, Double.parseDouble(property.getValue()), ChartColor.RED); + } + chart.addDataset("Entrées"); - PathPropertyList values = federation.getByYearPrefix("metrics.members.in").sortByPath(); + values = federation.getByYearPrefix("metrics.members.in").sortByPath(); for (PathProperty property : values) { chart.getLabels().add(property.getLeaf()); - chart.add(0, Double.parseDouble(property.getValue()), ChartColor.GREEN); - } - - chart.addDataset("Sorties"); - values = federation.getByYearPrefix("metrics.members.out").sortByPath(); - for (PathProperty property : values) - { - chart.add(1, Double.parseDouble(property.getValue()), ChartColor.RED); + chart.add(1, Double.parseDouble(property.getValue()), ChartColor.GREEN); } result = BarChartView.build(chart);