From b2cf17a9f35d08e526c0230845a92b4d592dfe79 Mon Sep 17 00:00:00 2001 From: "453530270@qq.com" Date: Mon, 14 Aug 2023 17:08:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BE=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/HomeView.vue | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 5531366..1aa2a6b 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -514,7 +514,7 @@ export default { var myChart = echarts.init(chartDom); var option; - var color = ['#FF99CC', '#6666FF', '#FF6600', '#7049f0', '#fa704d', '#01babc',] + var color = ['#a9eeff', '#6666FF', '#FF6600', '#02ff00', '#00ffff', '#fdff00']; var name = this.zxndata var xData = this.zxlindata @@ -565,6 +565,19 @@ export default { } // contruct option = { + // legend + legend: { + top:0, + right: 0, + // bottom: 40, + itemGap: 15, + itemWidth: 15, + textStyle: { + color: '#fff', + fontSize: '14' + }, + data: name + }, tooltip: { trigger: "axis", axisPointer: { // 坐标轴指示器,坐标轴触发有效 @@ -711,16 +724,6 @@ export default { value:item.proportion.split('%')[0] }) } - // 注释的方法未排序 - // pieData.forEach((item) => { - // that.circularData.groupName.push(item.groupName) - // that.circularData.proportion.push(item.proportion) - // that.kcdata.push({ - // name:item.groupName, - // value:item.proportion.split('%')[0] - // // value: item.noRepeatInNum, - // }) - // }) // 环形图 this.cgchart()