This commit is contained in:
syuilo 2023-01-02 19:58:51 +09:00
parent 70ce129478
commit f598a876eb
11 changed files with 8 additions and 92 deletions

View file

@ -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;
}