series: [
{
name:'睡眠时长',
type:'pie',
stillShowZeroSum: false,
radius: ['60%', '70%'],
avoidLabelOverlap: false,
label: {
normal: {
show: false,
position: 'center'
},
emphasis: {
show: true,
textStyle: {
fontSize: '30',
fontWeight: 'bold'
}
}
},
labelLine: {
normal: {
show: false
}
},
data:[
{
value:$this.state.SleepLong._12_24,
name:'> 12'
},
{
value:$this.state.SleepLong._10_12,
name:'10-12'
},
{
value:$this.state.SleepLong._8_10,
name:'8-10'
},
{
value:$this.state.SleepLong._6_8,
name:'6-8'
},
{
value:$this.state.SleepLong._0_6,
name:'< 6'
}
]
}
]
当value为零时,stillShowZeroSum属性失效,还继续显示饼图,不知道什么原因,官方demo在官网跑正常,但是移植到项目中就会失效,求大神解惑!!!
stillShowZeroSum: true:
stillShowZeroSum: false:
正常来讲应该不一样,问题是一样,我就蒙圈了。。。。
stillShowZeroSum为true的时候不显示啊
你的值是false 当然显示了