use of com.djrapitops.plan.delivery.rendering.json.graphs.bar.BarGraph in project Plan by plan-player-analytics.
the class GraphJSONCreator method createGeolocationJSON.
public Map<String, Object> createGeolocationJSON(Map<String, Integer> geolocationCounts) {
BarGraph geolocationBarGraph = graphs.bar().geolocationBarGraph(geolocationCounts);
WorldMap worldMap = graphs.special().worldMap(geolocationCounts);
return Maps.builder(String.class, Object.class).put("geolocations_enabled", config.get(DataGatheringSettings.GEOLOCATIONS) && config.get(DataGatheringSettings.ACCEPT_GEOLITE2_EULA)).put("geolocation_series", worldMap.getEntries()).put("geolocation_bar_series", geolocationBarGraph.getBars()).put("colors", Maps.builder(String.class, String.class).put("low", theme.getValue(ThemeVal.WORLD_MAP_LOW)).put("high", theme.getValue(ThemeVal.WORLD_MAP_HIGH)).put("bars", theme.getValue(ThemeVal.GREEN)).build()).build();
}