From 4b275f2093954cc58bbc23e4fc67e67d6fe81c0b Mon Sep 17 00:00:00 2001
From: Riku <risaku@163.com>
Date: 星期日, 13 七月 2025 22:46:35 +0800
Subject: [PATCH] 2025.7.13 污染动态溯源

---
 src/components/chart/RealTimeLineChart.vue |   20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/src/components/chart/RealTimeLineChart.vue b/src/components/chart/RealTimeLineChart.vue
index 7a2ea1d..cc72183 100644
--- a/src/components/chart/RealTimeLineChart.vue
+++ b/src/components/chart/RealTimeLineChart.vue
@@ -1,6 +1,10 @@
 <template>
   <div class="chart-wrap">
-    <div ref="lineChart" class="line-chart"></div>
+    <div
+      ref="lineChart"
+      class="line-chart"
+      :style="'height:' + chartHeight + ';'"
+    ></div>
   </div>
 </template>
 <script>
@@ -17,6 +21,16 @@
       //     series: []
       //   };
       // }
+    },
+    // 鎶樼嚎鍥惧睍绀洪珮搴�
+    chartHeight: {
+      type: String,
+      default: '140px'
+    },
+    // 鎶樼嚎鍥綴杞村埢搴﹂棿璺�
+    yMinInterval: {
+      type: Number,
+      default: 1
     }
   },
   data() {
@@ -37,7 +51,7 @@
     refreshChart() {
       const { xAxis, series } = this.modelValue;
       if (!this.option) {
-        this.option = smallLineOption(xAxis, series);
+        this.option = smallLineOption(xAxis, series, this.yMinInterval);
       } else {
         this.option.xAxis[0].data = xAxis;
         this.option.series = series;
@@ -72,7 +86,7 @@
 }
 .line-chart {
   width: 318px;
-  height: 140px;
+  /* height: 140px; */
   /* border-bottom: 1px solid rgba(255, 255, 255, 0.329); */
 }
 </style>

--
Gitblit v1.9.3