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) {