(name, fallback)
| 1681 | applyThemeToChartOptions: function (chartOptions, chartCanvas) { |
| 1682 | const styles = window.getComputedStyle(chartCanvas || document.body); |
| 1683 | const cssColor = function (name, fallback) { |
| 1684 | return styles.getPropertyValue(name).trim() || fallback; |
| 1685 | }; |
| 1686 | const textColor = styles.color || cssColor('--color-main-text', '#222222'); |
| 1687 | const axisColor = cssColor('--color-text-maxcontrast', '#6b6b6b'); |
| 1688 | const textChannels = textColor.match(/[\d.]+/g); |