From 4832906162b9a04c10eeec424c4b3fdf189872c1 Mon Sep 17 00:00:00 2001 From: "453530270@qq.com" Date: Mon, 14 Aug 2023 11:46:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/WhView.vue | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/src/views/WhView.vue b/src/views/WhView.vue index 0623b8d..66eb2f1 100644 --- a/src/views/WhView.vue +++ b/src/views/WhView.vue @@ -843,16 +843,24 @@ export default { var option // x 轴数组 - // var xData = that.zxlindata.slice(-10, that.zxlindata.length) var xData = that.zxlindata // 颜色数组 var color = ['#FF99CC', '#6666FF', '#FF6600', '#7049f0', '#fa704d', '#01babc',] // 名称数组 - // var name = that.rsqsDataName.slice(-10, that.rsqsDataName.length) var name = that.rsqsDataName // 值数组 - // var data = that.zxliddata.slice(-10, that.zxliddata.length) var data = that.zxliddata + // 线条色值 + let iconData = []; + that.rsqsDataName.forEach((item, index)=>{ + if(index==0){ + iconData.push({icon: 'image://img/tyc_icon.png', name: name[0]}) + }else if(index==1){ + iconData.push({icon: 'image://img/tyg_icon.png', name: name[1]}) + }else if(index==2){ + iconData.push({icon: 'image://img/yyg_icon.png', name: name[2]}) + } + }) var series = []; for (var i = 0; i < data.length; i++) { @@ -899,6 +907,21 @@ export default { } option = { // backgroundColor: "#141f56", + // lege + legend: { + top: 0, + right: 0, + itemGap: 20, + itemWidth: 20, + itemHeight: 20, + + textStyle: { + color: '#fff', + fontSize: '14', + // padding: [1, 12] + }, + data: iconData + }, title: { // text: "负面言论分领域趋势", textStyle: {