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