fix(charts): disable zoom interactions

This commit is contained in:
jxxghp
2026-06-29 08:08:53 +08:00
parent 5ca374349d
commit 82ab594e0c
6 changed files with 17 additions and 2 deletions
+3
View File
@@ -3,6 +3,9 @@
// 👉 Apex chart // 👉 Apex chart
.apexcharts-canvas { .apexcharts-canvas {
// 图表仅保留纵向页面滚动,禁止双指缩放等触摸手势。
touch-action: pan-y;
// For RTL alignment // For RTL alignment
.apexcharts-yaxis-texts-g { .apexcharts-yaxis-texts-g {
text-align: start; text-align: start;
+6 -2
View File
@@ -64,8 +64,10 @@ const historyChartOptions = computed(() => {
enabled: true, enabled: true,
}, },
zoom: { zoom: {
autoScaleYaxis: true, enabled: false,
allowMouseWheelZoom: false,
}, },
selection: { enabled: false },
}, },
theme: { theme: {
mode: vuetifyTheme.global.current.value.dark ? 'dark' : 'light', // 同步主题模式 mode: vuetifyTheme.global.current.value.dark ? 'dark' : 'light', // 同步主题模式
@@ -156,8 +158,10 @@ const seedingChartOptions = computed(() => {
background: currentTheme.value.surface, // 新增背景色同步 background: currentTheme.value.surface, // 新增背景色同步
foreColor: currentTheme.value.onSurface, // 新增文字颜色同步 foreColor: currentTheme.value.onSurface, // 新增文字颜色同步
zoom: { zoom: {
autoScaleYaxis: true, enabled: false,
allowMouseWheelZoom: false,
}, },
selection: { enabled: false },
}, },
theme: { theme: {
mode: vuetifyTheme.global.current.value.dark ? 'dark' : 'light', // 同步主题模式 mode: vuetifyTheme.global.current.value.dark ? 'dark' : 'light', // 同步主题模式
+2
View File
@@ -75,6 +75,8 @@ const chartOptions = controlledComputed(
chart: { chart: {
parentHeightOffset: 0, parentHeightOffset: 0,
toolbar: { show: false }, toolbar: { show: false },
zoom: { enabled: false, allowMouseWheelZoom: false },
selection: { enabled: false },
animations: { enabled: false }, animations: { enabled: false },
foreColor: axisLabelColor, foreColor: axisLabelColor,
}, },
+2
View File
@@ -81,6 +81,8 @@ const chartOptions = controlledComputed(
chart: { chart: {
parentHeightOffset: 0, parentHeightOffset: 0,
toolbar: { show: false }, toolbar: { show: false },
zoom: { enabled: false, allowMouseWheelZoom: false },
selection: { enabled: false },
animations: { enabled: false }, animations: { enabled: false },
foreColor: axisLabelColor, foreColor: axisLabelColor,
}, },
+2
View File
@@ -76,6 +76,8 @@ const chartOptions = controlledComputed(
chart: { chart: {
parentHeightOffset: 0, parentHeightOffset: 0,
toolbar: { show: false }, toolbar: { show: false },
zoom: { enabled: false, allowMouseWheelZoom: false },
selection: { enabled: false },
animations: { enabled: false }, animations: { enabled: false },
foreColor: axisLabelColor, foreColor: axisLabelColor,
}, },
@@ -28,6 +28,8 @@ const options = controlledComputed(
chart: { chart: {
parentHeightOffset: 0, parentHeightOffset: 0,
toolbar: { show: false }, toolbar: { show: false },
zoom: { enabled: false, allowMouseWheelZoom: false },
selection: { enabled: false },
animations: { enabled: false }, animations: { enabled: false },
}, },
plotOptions: { plotOptions: {