Search in sources :

Example 1 with WorldMap

use of com.djrapitops.plan.delivery.rendering.json.graphs.special.WorldMap 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();
}
Also used : WorldMap(com.djrapitops.plan.delivery.rendering.json.graphs.special.WorldMap) BarGraph(com.djrapitops.plan.delivery.rendering.json.graphs.bar.BarGraph)

Aggregations

BarGraph (com.djrapitops.plan.delivery.rendering.json.graphs.bar.BarGraph)1 WorldMap (com.djrapitops.plan.delivery.rendering.json.graphs.special.WorldMap)1