原图:
需要的状态图:
代码:
itemStyle: {
normal: {
label: {
show: false //隐藏文字
},
labelLine: {
show: false //隐藏指示线
}
},
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 2, 2, 0.3)'
}
}
下面是饼状图内部显示两行文字的方法:
title: {
text: '12350家',
x: 'center',
y: 'center',
top: '130',
textStyle: {
fontSize: 15,
color: '#020202',
fontWeight: '400'
}
},
graphic: { //图形中间文字
type: "text",
left: "center",
top: "156rpx",
style: {
text: '占比26%',
textAlign: "center",
fill: "#0090C1",
fontSize: 12
}
},