From b8433e84ebfc2743091c29847313ac66202d271a Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Fri, 22 Jul 2022 16:26:00 +0200 Subject: [PATCH] Swap columns in htmlizeOrganizationInOutChart. --- .../statoolinfos/htmlize/ChartHtmlizer.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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);