From af32a93848ddedd72a5aa2d254a0fe18631983c8 Mon Sep 17 00:00:00 2001 From: JinxChen <2183691628@qq.com> Date: Thu, 6 Jul 2023 17:30:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3Level=E5=8F=82=E6=95=B0=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E5=9C=86=E7=82=B9=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/health/psychological/index.vue | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/src/views/health/psychological/index.vue b/src/views/health/psychological/index.vue index 4087273..7e03f66 100644 --- a/src/views/health/psychological/index.vue +++ b/src/views/health/psychological/index.vue @@ -519,23 +519,6 @@ export default { symbol: "circle", symbolSize: 8, // 拐点圆的大小 areaStyle: {}, - itemStyle: { - color: function(params) { - // 动态设置折线图远点颜色 - let value = params.data; - let color = ''; - if (value <= 40) { - color = "#62BD48"; - } else if (value > 40 && value <= 65) { - color = "#FEC350"; - } else if (value > 65 && value <= 80) { - color = "#F86825"; - } else if (value > 80) { - color = "#EB1D15"; - } - return color; - } - } }, { name: `轻度${this.emoName}倾向`, @@ -893,7 +876,12 @@ export default { this.emotionList.push(SevereDay); // 图表数据 this.emotionData = data.ChartDatas.map(item => { - return item.Value; + return { + value: item.Value, + itemStyle: { + color: this.calcResultColor(item.Level) + } + }; }); // x轴显示数据 if(this.currentDays === 0) {