enhance(client): enhance dashboard of control panel

This commit is contained in:
syuilo 2022-12-23 15:21:55 +09:00
parent c0fc0b92d3
commit 052e667f03
14 changed files with 1145 additions and 752 deletions

View file

@ -25,6 +25,7 @@ import number from '@/filters/number';
import * as os from '@/os';
import { defaultStore } from '@/store';
import { useChartTooltip } from '@/scripts/use-chart-tooltip';
import { chartVLine } from '@/scripts/chart-vline';
Chart.register(
ArcElement,
@ -105,6 +106,8 @@ const color =
'?' as never;
onMounted(() => {
const vLineColor = defaultStore.state.darkMode ? 'rgba(255, 255, 255, 0.2)' : 'rgba(0, 0, 0, 0.2)';
chartInstance = new Chart(chartEl.value, {
type: 'line',
data: {
@ -167,6 +170,7 @@ onMounted(() => {
},
},
},
plugins: [chartVLine(vLineColor)],
});
});