option = {
tooltip: {
trigger: 'item'
},
legend: {
// selectedMode: false, // 取消图例上的点击事件
type: 'plain',
orient: 'vertical',
left: '65%',
top: 'center',
align: 'left',
itemGap: 6,
itemWidth: 10, // 设置宽度
itemHeight: 10, // 设置高度
icon:'rect',
symbolKeepAspect: false,
//最主要
formatter: function (name) {
let data = option.series[0].data
// console.log(data, 'data')
let total = 0
let tarValue
for (let i = 0; i < data.length