var option = { title: { show: Object.keys(radar).length === 0, // show: Object.keys(this.quanguoData).length === 0, text: ‘暂无数据‘ , x: ‘center‘ , y: ‘center‘ , textStyle: { color: ‘#bcbcbc‘, fontWeight: 600, fontSize: 16 } }, tooltip: { trigger: ‘item‘, }, legend: { orient: ‘vertical‘, left: ‘80%‘, bottom: ‘20%‘, itemWidth: 8, // 设置宽度 itemHeight: 8, textStyle: { color: ‘#B2D2E3‘ }, data: [‘本地值‘, ‘网络值‘], }, radar: [ { indicator: radar.length == 0 ? [{}] : radar, //indicator必须是数组的空对象
// indicator: this.radarData, name: { formatter: ‘{value}‘, textStyle: { color: ‘#B2D2E3‘ // 文字颜色 } }, radius: 80 } ], series: [ { type: ‘radar‘, areaStyle: {}, data: [ { name: ‘本地值‘, value: bend, // value: this.bendiData, itemStyle: { normal: { color: "rgba(244, 94, 35, 0.8)", opacity: 0.2, } }, }, { name: ‘网络值‘, value: quan, // value: this.quanguoData, itemStyle: { normal: { color: "rgba(34, 143, 254, 1)", } }, } ] } ] }; this.netWorkEc.setOption(option)
原文地址:https://www.cnblogs.com/xhrr/p/12620049.html
时间: 2024-10-21 20:51:50