From fdc90a91d5a4689157ee6c6f7f295bef6b057b82 Mon Sep 17 00:00:00 2001 From: guoapeng Date: Tue, 15 Jul 2025 15:44:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=9B=BE=E8=A1=A8=E5=8F=8Cy=E8=BD=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/home/LineChart.vue | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/components/home/LineChart.vue b/src/components/home/LineChart.vue index b9ed49e..bb7dc03 100644 --- a/src/components/home/LineChart.vue +++ b/src/components/home/LineChart.vue @@ -77,9 +77,16 @@ watch( boundaryGap: false, data: newValue.data?.map(item => formatDateTime('HH:mm:ss', item.timestamp)), }, - yAxis: { - type: 'value', - }, + yAxis: [ + { + type: 'value', + name: '温/湿度', + }, + { + type: 'value', + name: 'H₂O₂浓度/相对饱和度', + }, + ], series: [ { name: '温度', @@ -109,6 +116,7 @@ watch( data: newValue.data?.map(item => item.h2o2.toFixed(2)), symbol: 'circle', symbolSize: 2, + yAxisIndex: 1, lineStyle: { color: '#ffd700', width: 1, @@ -120,6 +128,7 @@ watch( data: newValue.data?.map(item => item.rs.toFixed(2)), symbol: 'circle', symbolSize: 2, + yAxisIndex: 1, lineStyle: { color: '#ff0000', width: 1,