diff options
Diffstat (limited to 'packages/frontend/src/scripts/init-chart.ts')
| -rw-r--r-- | packages/frontend/src/scripts/init-chart.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/frontend/src/scripts/init-chart.ts b/packages/frontend/src/scripts/init-chart.ts index 32f887f2e7..005ac5e271 100644 --- a/packages/frontend/src/scripts/init-chart.ts +++ b/packages/frontend/src/scripts/init-chart.ts @@ -19,6 +19,7 @@ import { import gradient from 'chartjs-plugin-gradient'; import zoomPlugin from 'chartjs-plugin-zoom'; import { MatrixController, MatrixElement } from 'chartjs-chart-matrix'; +import { defaultStore } from '@/store'; export function initChart() { Chart.register( @@ -41,4 +42,11 @@ export function initChart() { zoomPlugin, gradient, ); + + // フォントカラー + Chart.defaults.color = getComputedStyle(document.documentElement).getPropertyValue('--fg'); + + Chart.defaults.borderColor = defaultStore.state.darkMode ? 'rgba(255, 255, 255, 0.1)' : 'rgba(0, 0, 0, 0.1)'; + + Chart.defaults.animation = false; } |