this.proType = res.data
let changeArr = []
this.proType.forEach(item => {
changeArr.push({
name: item.projectTypeName,
value: item.count
})
})
//饼图项目类别占比
let option ={
legend: {
icon: 'circle',
orient: 'vertical',
right: 48,
top: 25,
itemGap: 25,
itemWidth: 8,
textStyle:{
color:[],
fontSize: 14
},
formatter: (params) => { //格式化数据的函数
for (let a = 0; a < this.proType.length; a++) {
if (this.proType[a].projectTypeName == params) {
return params + ':' + this.proType[a].count
}
}
}
},
03-16
1万+