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