series: [
{
type: 'pie',
radius: ['30%', '55%'],
label: {
show: true,
position: 'center',
formatter: function (params) {
return (
'{a|' +
(params.data.ratio * 100).toFixed(2) +
'%}' +
'\n\n' +
'{b|' +
params.name +
'}'
);
},
rich: {
a: {
color: '#03a9f4',
fontSize: 14,
backgroundColor: 'white'
},
b: {
color: '#333333',
fontSize: 14,
backgroundColor: 'white'
}
}
},
labelLine: {
show: false
},
color: ['#71c4fe', '#189dfe'],
data: props.marriageSource,
itemStyle: {
shadowBlur: 10, // shadowOffsetX: 10,
shadowColor: 'rgba(9, 59, 110, 0.33)'
}
}
]
echarts环形图将label显示在中间,每一类数据高亮显示对应数据,样式不重叠
最新推荐文章于 2023-08-10 09:46:58 发布