Fixed country code management.

This commit is contained in:
Christian P. MOMON 2021-01-16 04:43:40 +01:00
parent 28fe19914c
commit ee67a18f0d
2 changed files with 10 additions and 2 deletions

View file

@ -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;

View file

@ -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);