mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-25 18:47:50 +01:00
Fixed WorldPie colors
This commit is contained in:
parent
e6bac8b13e
commit
511230a186
@ -89,6 +89,7 @@ public enum Settings {
|
||||
THEME_GRAPH_CHUNKS("Theme.Graphs.Chunks"),
|
||||
THEME_GRAPH_ENTITIES("Theme.Graphs.Entities"),
|
||||
THEME_GRAPH_WORLD_PIE("Theme.Graphs.WorldPie"),
|
||||
THEME_GRAPH_GM_PIE("Theme.Graphs.GMDrilldown"),
|
||||
THEME_GRAPH_ACTIVITY_PIE("Theme.Graphs.ActivityPie"),
|
||||
THEME_GRAPH_SERVER_PREF_PIE("Theme.Graphs.ServerPreferencePie"),
|
||||
// StringList
|
||||
|
@ -36,6 +36,7 @@ public class WorldPart extends RawData {
|
||||
addValue("worldSeries", seriesData[0]);
|
||||
addValue("gmSeries", seriesData[1]);
|
||||
addValue("worldPieColors", Settings.THEME_GRAPH_WORLD_PIE.toString());
|
||||
addValue("gmPieColors", Settings.THEME_GRAPH_GM_PIE.toString());
|
||||
}
|
||||
|
||||
public WorldTimes getWorldTimes() {
|
||||
|
@ -83,6 +83,7 @@ public class InspectPageParser extends PageParser {
|
||||
Map<String, Long> playtimeByServer = sessionsTable.getPlaytimeByServer(uuid);
|
||||
addValue("serverPieSeries", ServerPreferencePieCreator.createSeriesData(playtimeByServer));
|
||||
addValue("worldPieColors", Settings.THEME_GRAPH_WORLD_PIE.toString());
|
||||
addValue("gmPieColors", Settings.THEME_GRAPH_GM_PIE.toString());
|
||||
addValue("serverPieColors", Settings.THEME_GRAPH_SERVER_PREF_PIE.toString());
|
||||
|
||||
List<String> geolocations = db.getIpsTable().getGeolocations(uuid);
|
||||
|
@ -163,14 +163,14 @@ public class HtmlStructure {
|
||||
html.append("</div>")
|
||||
.append("<div class=\"session-col\">");
|
||||
|
||||
String id = "worldPie" + session.getSessionStart();
|
||||
String id = "worldPie" + session.getSessionStart() + i;
|
||||
|
||||
html.append("<div id=\"").append(id).append("\" style=\"width: 100%; height: 400px;\"></div>");
|
||||
|
||||
String[] worldData = WorldPieCreator.createSeriesData(session.getWorldTimes());
|
||||
|
||||
html.append("<script>")
|
||||
.append("var ").append(id).append("series = {name:'World Playtime',colorByPoint:true,data:").append(worldData[0]).append("};")
|
||||
.append("var ").append(id).append("series = {name:'World Playtime',colors: worldPieColors,colorByPoint:true,data:").append(worldData[0]).append("};")
|
||||
.append("var ").append(id).append("gmseries = ").append(worldData[1]).append(";")
|
||||
.append("</script>");
|
||||
|
||||
|
@ -59,7 +59,7 @@ public class WorldPieCreator {
|
||||
for (Map.Entry<String, GMTimes> world : gmTimesMap.entrySet()) {
|
||||
drilldownBuilder.append("{name:'").append(world.getKey())
|
||||
.append("', id:'").append(world.getKey())
|
||||
.append("',");
|
||||
.append("',colors: gmPieColors,");
|
||||
drilldownBuilder.append("data: [");
|
||||
|
||||
appendGMTimesForWorld(drilldownBuilder, world);
|
||||
|
@ -93,7 +93,8 @@ Theme:
|
||||
RAM: Base
|
||||
Chunks: Base
|
||||
Entities: Base
|
||||
WorldPie: '"#438c99", "#639A67", "#D8EBB5", "#D9BF77", "#0099C6", "#66AA00", "#316395", "#994499", "#22AA99", "#AAAA11", "#6633CC", "#E67300", "#329262", "#5574A6"'
|
||||
WorldPie: '"#0099C6", "#66AA00", "#316395", "#994499", "#22AA99", "#AAAA11", "#6633CC", "#E67300", "#329262", "#5574A6"'
|
||||
GMDrilldown: '"#438c99", "#639A67", "#D8EBB5", "#D9BF77"'
|
||||
ActivityPie: '"#228B22", "#A9A9A9", "#808080", "#951800"'
|
||||
ServerPreferencePie: '"#0099C6", "#66AA00", "#316395", "#994499", "#22AA99", "#AAAA11", "#6633CC", "#E67300", "#329262", "#5574A6"'
|
||||
|
||||
|
@ -427,10 +427,12 @@
|
||||
y: ${banned}
|
||||
}]
|
||||
};
|
||||
var worldPieColors = [${worldPieColors}];
|
||||
var gmPieColors = [${gmPieColors}];
|
||||
var worldSeries = {
|
||||
name: 'World Playtime',
|
||||
colorByPoint: true,
|
||||
colors: [${worldPieColors}],
|
||||
colors: worldPieColors,
|
||||
data: ${worldSeries}
|
||||
};
|
||||
var gmSeries = ${gmSeries};
|
||||
|
Loading…
Reference in New Issue
Block a user