diff --git a/src/fr/devinsy/statoolinfos/core/Service.java b/src/fr/devinsy/statoolinfos/core/Service.java index 7a77fbd..0d50e1f 100644 --- a/src/fr/devinsy/statoolinfos/core/Service.java +++ b/src/fr/devinsy/statoolinfos/core/Service.java @@ -158,12 +158,17 @@ public class Service extends PathPropertyList { String result; - result = get("organization.country.code"); + result = StringUtils.toRootUpperCase(get("host.country.code")); // return result; } + /** + * Gets the crawled date. + * + * @return the crawled date + */ public LocalDateTime getCrawledDate() { LocalDateTime result; diff --git a/src/fr/devinsy/statoolinfos/htmlize/Htmlizer.java b/src/fr/devinsy/statoolinfos/htmlize/Htmlizer.java index 15abeeb..4490ba0 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/Htmlizer.java +++ b/src/fr/devinsy/statoolinfos/htmlize/Htmlizer.java @@ -373,9 +373,12 @@ public class Htmlizer PieChart pie = new PieChart("Pays des services"); int index = 0; + int maxIndex = stats.keySet().size(); 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);