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

View File

@@ -3,6 +3,9 @@
// 👉 Apex chart
.apexcharts-canvas {
// 图表仅保留纵向页面滚动,禁止双指缩放等触摸手势。
touch-action: pan-y;
// For RTL alignment
.apexcharts-yaxis-texts-g {
text-align: start;

View File

@@ -64,8 +64,10 @@ const historyChartOptions = computed(() => {
enabled: true,
},
zoom: {
autoScaleYaxis: true,
enabled: false,
allowMouseWheelZoom: false,
},
selection: { enabled: false },
},
theme: {
mode: vuetifyTheme.global.current.value.dark ? 'dark' : 'light', // 同步主题模式
@@ -156,8 +158,10 @@ const seedingChartOptions = computed(() => {
background: currentTheme.value.surface, // 新增背景色同步
foreColor: currentTheme.value.onSurface, // 新增文字颜色同步
zoom: {
autoScaleYaxis: true,
enabled: false,
allowMouseWheelZoom: false,
},
selection: { enabled: false },
},
theme: {
mode: vuetifyTheme.global.current.value.dark ? 'dark' : 'light', // 同步主题模式

View File

@@ -75,6 +75,8 @@ const chartOptions = controlledComputed(
chart: {
parentHeightOffset: 0,
toolbar: { show: false },
zoom: { enabled: false, allowMouseWheelZoom: false },
selection: { enabled: false },
animations: { enabled: false },
foreColor: axisLabelColor,
},

View File

@@ -81,6 +81,8 @@ const chartOptions = controlledComputed(
chart: {
parentHeightOffset: 0,
toolbar: { show: false },
zoom: { enabled: false, allowMouseWheelZoom: false },
selection: { enabled: false },
animations: { enabled: false },
foreColor: axisLabelColor,
},

View File

@@ -76,6 +76,8 @@ const chartOptions = controlledComputed(
chart: {
parentHeightOffset: 0,
toolbar: { show: false },
zoom: { enabled: false, allowMouseWheelZoom: false },
selection: { enabled: false },
animations: { enabled: false },
foreColor: axisLabelColor,
},

View File

@@ -28,6 +28,8 @@ const options = controlledComputed(
chart: {
parentHeightOffset: 0,
toolbar: { show: false },
zoom: { enabled: false, allowMouseWheelZoom: false },
selection: { enabled: false },
animations: { enabled: false },
},
plotOptions: {