summaryrefslogtreecommitdiffstats
path: root/scripts/lib/build_perf/html/measurement_chart.html
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/build_perf/html/measurement_chart.html')
-rw-r--r--scripts/lib/build_perf/html/measurement_chart.html15
1 files changed, 11 insertions, 4 deletions
diff --git a/scripts/lib/build_perf/html/measurement_chart.html b/scripts/lib/build_perf/html/measurement_chart.html
index 7982ec39c2..ad4a93ed02 100644
--- a/scripts/lib/build_perf/html/measurement_chart.html
+++ b/scripts/lib/build_perf/html/measurement_chart.html
@@ -81,13 +81,20 @@
81 81
82 // Draw chart 82 // Draw chart
83 const chart_div = document.getElementById('{{ chart_elem_id }}'); 83 const chart_div = document.getElementById('{{ chart_elem_id }}');
84 const measurement_chart= echarts.init(chart_div, null, { 84 // Set dark mode
85 height: 320 85 let measurement_chart
86 }); 86 if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
87 measurement_chart= echarts.init(chart_div, 'dark', {
88 height: 320
89 });
90 } else {
91 measurement_chart= echarts.init(chart_div, null, {
92 height: 320
93 });
94 }
87 // Change chart size with browser resize 95 // Change chart size with browser resize
88 window.addEventListener('resize', function() { 96 window.addEventListener('resize', function() {
89 measurement_chart.resize(); 97 measurement_chart.resize();
90 }); 98 });
91 measurement_chart.setOption(option); 99 measurement_chart.setOption(option);
92</script> 100</script>
93