mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-06 15:44:49 +08:00
Fix Highcharts dark mode switching (#1861)
* Fix Highcharts dark mode switching Dark/light mode wasn't getting applied because of empty graph objects in the graphs array. Includes a hack for Highcharts directly mutating the passed theme object on every update() call.
This commit is contained in:
parent
3f275fd7e4
commit
e70158250f
@ -711,7 +711,13 @@ function worldPie(id, worldSeries, gmSeries) {
|
||||
}
|
||||
|
||||
function updateGraphs() {
|
||||
for (let graph of graphs) {
|
||||
const scrollbar = {...Highcharts.theme.scrollbar};
|
||||
graphs.forEach((graph, index, array) => {
|
||||
if (Object.keys(graph).length === 0) {
|
||||
array.splice(index, 1);
|
||||
return;
|
||||
}
|
||||
Highcharts.theme["scrollbar"] = {...scrollbar};
|
||||
graph.update(Highcharts.theme);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user