Fixed color management in country chart.
This commit is contained in:
parent
ee67a18f0d
commit
979ebac18d
1 changed files with 5 additions and 2 deletions
|
@ -295,9 +295,12 @@ public class Htmlizer
|
||||||
|
|
||||||
PieChart pie = new PieChart("Pays des membres");
|
PieChart pie = new PieChart("Pays des membres");
|
||||||
int index = 0;
|
int index = 0;
|
||||||
|
int maxIndex = ChartColor.values().length;
|
||||||
for (String country : stats.keySet())
|
for (String country : stats.keySet())
|
||||||
{
|
{
|
||||||
pie.add(country, stats.get(country), ChartColor.values()[index]);
|
pie.add(country, stats.get(country), ChartColor.values()[index % maxIndex]);
|
||||||
|
|
||||||
|
index += 1;
|
||||||
}
|
}
|
||||||
pie.setLegendPosition(Position.RIGHT);
|
pie.setLegendPosition(Position.RIGHT);
|
||||||
|
|
||||||
|
@ -373,7 +376,7 @@ public class Htmlizer
|
||||||
|
|
||||||
PieChart pie = new PieChart("Pays des services");
|
PieChart pie = new PieChart("Pays des services");
|
||||||
int index = 0;
|
int index = 0;
|
||||||
int maxIndex = stats.keySet().size();
|
int maxIndex = ChartColor.values().length;
|
||||||
for (String country : stats.keySet())
|
for (String country : stats.keySet())
|
||||||
{
|
{
|
||||||
pie.add(country, stats.get(country), ChartColor.values()[index % maxIndex]);
|
pie.add(country, stats.get(country), ChartColor.values()[index % maxIndex]);
|
||||||
|
|
Loading…
Reference in a new issue