效果:
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/f500be63e99e9798b6c2d72ee51d4937.png)
在series中把label变成false,再单独在data中配置想要展示的label
series: [{
type: 'pie',
radius: ['55%', '66%'],
center: ['40%', '45%'],
avoidLabelOverlap: false,
label: {
show: false
},
emphasis: {
label: {
show: false,
fontSize: '40',
fontWeight: 'bold'
}
},
labelLine: {
show: false
},
data: [{
value: 1376,
name: '执行中',
itemStyle: {
normal: {
color: '#4499e9'
}
},
label: {
show: true,
formatter: '{a|{@执行中}}\n{b|执行中}',
rich: {
a: {
fontSize: 32,
lineHeight: 40,
fontFamily: 'Alternate'
},
b: {
fontSize: 12,
color: '#999',
lineHeight: 16
}
},
position: 'center',
emphasis: {
show: true
}
}
},
{
value: 354,
name: '成功',
itemStyle: {
normal: {
color: '#48d0aa'
}
}
},
{
value: 20,
name: '异常',
itemStyle: {
normal: {
color: '#ff8300'
}
}
},
{
value: 46,
name: '失败',
itemStyle: {
normal: {
color: '#ffb752'
}
}
}
]
}
]