(name, fallback)
| 1673 | applyThemeToChartOptions: function (chartOptions, chartCanvas) { |
| 1674 | const styles = window.getComputedStyle(chartCanvas || document.body); |
| 1675 | const cssColor = function (name, fallback) { |
| 1676 | return styles.getPropertyValue(name).trim() || fallback; |
| 1677 | }; |
| 1678 | const textColor = styles.color || cssColor('--color-main-text', '#222222'); |
| 1679 | const axisColor = cssColor('--color-text-maxcontrast', '#6b6b6b'); |
| 1680 | const textChannels = textColor.match(/[\d.]+/g); |