數據過多,且幾個比較小的數據在一塊扎堆
例如:
*解決方法: *
series: [
{
name: '',
type: 'pie',
center: ["25%", "50%"],
radius: ['45%', '60%'],
minAngle: 10, // 設置每塊扇形的最小占比
avoidLabelOverlap: false,
hoverAnimation: false,
silent: true,
label: {
normal: {
show: true,
formatter: "{d}% ",
textStyle: {
fontSize: this.standSize / 150,
color: "#fff"
},
},
},
labelLine: {
normal: {
lineStyle: {
color: 'rgba(255, 255, 255, 0.3)'
},
smooth: 0.2,
length: this.standSize / 50,
length2: this.standSize / 100,
}
},
data: data
}
],
本段代碼是在vue實例中寫的,standSize在data中已定義standSize: document.body.clientWidth
*修改后如下: *