diff --git a/src/main/webapp/js/echarts-api.js b/src/main/webapp/js/echarts-api.js index 6c59e45..5c9869d 100644 --- a/src/main/webapp/js/echarts-api.js +++ b/src/main/webapp/js/echarts-api.js @@ -501,6 +501,11 @@ const echartsJenkinsApi = { document.addEventListener(redrawChartEvent, function () { renderAsynchronously(chart); }); + if (window.getThemeManagerProperty && window.isSystemRespectingTheme) { + window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => { + renderAsynchronously(chart); + }); + } getConfigurationDialog().addEventListener("hidden.bs.modal", function () { const configuration = echartsJenkinsApi.readConfiguration(localStorageId);