From e7d2c83f5232fcd0c07d1866a938f611a183ca8f Mon Sep 17 00:00:00 2001 From: wangchengming <15110151257@163.com> Date: Fri, 12 Dec 2025 15:24:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/chart/pages/Calculation.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/views/chart/pages/Calculation.vue b/src/views/chart/pages/Calculation.vue index b820f7b..c802154 100644 --- a/src/views/chart/pages/Calculation.vue +++ b/src/views/chart/pages/Calculation.vue @@ -247,8 +247,10 @@ export default { if (item.end_time) { clearInterval(this.timer) } - this.chartData.xAxisData.push(new Date().toLocaleString().replaceAll('/', '-')) - this.chartData.seriesData.push((item.loss ? item.loss : 0)) + if (item.loss) { + this.chartData.xAxisData.push(new Date().toLocaleString().replaceAll('/', '-')) + this.chartData.seriesData.push(item.loss) + } } }) this.myChart.setOption({ @@ -271,7 +273,7 @@ export default { title: { left: 'center', text: 'LOSS', - textStyle: { + textStyle: { color: '#ffffff' // 可选:字体粗细 } },