diff --git a/src/@core/scss/libs/apex-chart.scss b/src/@core/scss/libs/apex-chart.scss index 2665ff6b..1aeec65f 100644 --- a/src/@core/scss/libs/apex-chart.scss +++ b/src/@core/scss/libs/apex-chart.scss @@ -3,6 +3,9 @@ // 👉 Apex chart .apexcharts-canvas { + // 图表仅保留纵向页面滚动,禁止双指缩放等触摸手势。 + touch-action: pan-y; + // For RTL alignment .apexcharts-yaxis-texts-g { text-align: start; diff --git a/src/components/dialog/SiteUserDataDialog.vue b/src/components/dialog/SiteUserDataDialog.vue index 336cb706..74536c48 100644 --- a/src/components/dialog/SiteUserDataDialog.vue +++ b/src/components/dialog/SiteUserDataDialog.vue @@ -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', // 同步主题模式 diff --git a/src/views/dashboard/AnalyticsCpu.vue b/src/views/dashboard/AnalyticsCpu.vue index b9fed2f8..fe0368c5 100644 --- a/src/views/dashboard/AnalyticsCpu.vue +++ b/src/views/dashboard/AnalyticsCpu.vue @@ -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, }, diff --git a/src/views/dashboard/AnalyticsMemory.vue b/src/views/dashboard/AnalyticsMemory.vue index 9ea2b15c..e7e5597d 100644 --- a/src/views/dashboard/AnalyticsMemory.vue +++ b/src/views/dashboard/AnalyticsMemory.vue @@ -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, }, diff --git a/src/views/dashboard/AnalyticsNetwork.vue b/src/views/dashboard/AnalyticsNetwork.vue index 46d803ef..3960e141 100644 --- a/src/views/dashboard/AnalyticsNetwork.vue +++ b/src/views/dashboard/AnalyticsNetwork.vue @@ -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, }, diff --git a/src/views/dashboard/AnalyticsWeeklyOverview.vue b/src/views/dashboard/AnalyticsWeeklyOverview.vue index e6a7caf5..b1f71197 100644 --- a/src/views/dashboard/AnalyticsWeeklyOverview.vue +++ b/src/views/dashboard/AnalyticsWeeklyOverview.vue @@ -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: {