From 2eb996e89891da7fe35b6e909b28097ef9683b6e Mon Sep 17 00:00:00 2001
From: dengzedong <dengzedong@email>
Date: 星期一, 09 六月 2025 14:39:29 +0800
Subject: [PATCH] 建议快照 图表Y轴上下限函数

---
 src/views/model/sche/suggest/suggestSnapshot.vue |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/views/model/sche/suggest/suggestSnapshot.vue b/src/views/model/sche/suggest/suggestSnapshot.vue
index 62c6405..fd8272f 100644
--- a/src/views/model/sche/suggest/suggestSnapshot.vue
+++ b/src/views/model/sche/suggest/suggestSnapshot.vue
@@ -211,9 +211,12 @@
           textStyle: { fontSize: 14 }
         },
         tooltip: { trigger: 'axis' },
-        grid: { top: 30, left: '3%', right: '5%', bottom: 20 },
+        grid: { top: '10%', left: '3%', right: '5%', bottom: 20 },
         xAxis: {type: 'category'},
-        yAxis: { type: 'value' },
+        yAxis: { type: 'value',
+          max: (value) => chartInfo.data?.limitH && value.max < chartInfo.data.limitH ? chartInfo.data?.limitH : null,
+          min: (value) => chartInfo.data?.limitL && value.min > chartInfo.data.limitL ? chartInfo.data?.limitL : null,
+        },
         dataZoom: [{ type: 'inside' }],
         series: [{
           type: 'line',

--
Gitblit v1.9.3