Swap columns in htmlizeOrganizationInOutChart.

This commit is contained in:
Christian P. MOMON 2022-07-22 16:26:00 +02:00
parent 62f1b7b92f
commit b8433e84eb

View file

@ -913,19 +913,19 @@ public class ChartHtmlizer
BarChart chart = new BarChart("Entrées/Sorties"); BarChart chart = new BarChart("Entrées/Sorties");
// chart.setStacked(true); // 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"); chart.addDataset("Entrées");
PathPropertyList values = federation.getByYearPrefix("metrics.members.in").sortByPath(); values = federation.getByYearPrefix("metrics.members.in").sortByPath();
for (PathProperty property : values) for (PathProperty property : values)
{ {
chart.getLabels().add(property.getLeaf()); chart.getLabels().add(property.getLeaf());
chart.add(0, Double.parseDouble(property.getValue()), ChartColor.GREEN); chart.add(1, 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);
} }
result = BarChartView.build(chart); result = BarChartView.build(chart);