This commit is contained in:
jxxghp
2025-03-22 09:53:21 +08:00
parent a15afabfa7
commit 6eabeb09c9

View File

@@ -54,6 +54,8 @@ const historyChartOptions = computed(() => {
parentHeightOffset: 0,
toolbar: { show: false },
animations: { enabled: true },
background: currentTheme.value.surface, // 新增背景色同步
foreColor: currentTheme.value.onSurface, // 新增文字颜色同步
dataLabels: {
enabled: true,
},
@@ -61,6 +63,9 @@ const historyChartOptions = computed(() => {
autoScaleYaxis: true,
},
},
theme: {
mode: vuetifyTheme.global.current.value.dark ? 'dark' : 'light', // 同步主题模式
},
tooltip: {
enabled: true,
tooltip: {
@@ -68,6 +73,10 @@ const historyChartOptions = computed(() => {
format: 'dd MMM yyyy',
},
},
style: {
background: currentTheme.value.background, // 提示框背景色同步
color: currentTheme.value.onBackground, // 文字颜色同步
},
},
grid: {
xaxis: {
@@ -140,10 +149,15 @@ const seedingChartOptions = computed(() => {
parentHeightOffset: 0,
toolbar: { show: false },
animations: { enabled: true },
background: currentTheme.value.surface, // 新增背景色同步
foreColor: currentTheme.value.onSurface, // 新增文字颜色同步
zoom: {
autoScaleYaxis: true,
},
},
theme: {
mode: vuetifyTheme.global.current.value.dark ? 'dark' : 'light', // 同步主题模式
},
tooltip: {
enabled: true,
x: {
@@ -151,6 +165,10 @@ const seedingChartOptions = computed(() => {
return '数量:' + val.toLocaleString()
},
},
style: {
background: currentTheme.value.background, // 提示框背景色同步
color: currentTheme.value.onBackground, // 文字颜色同步
},
},
grid: {
xaxis: {