label: {
formatter: function (data) {
// console.log(data)
return '{til|' + data.name + '}\n{desc|' + data.data.desc + '}'
},
show: true,
rich: {
til: {
color: '#000',
fontSize: 14,
align: 'center',
lineHeight: 21
},
desc: {
color: '#000',
fontSize: 9,
align: 'center',
lineHeight: 21
}
}
}
给饼图的label设置rich后点击label无法触发点击事件,但饼图可以点击,这是什么原因造成的?
myChart.on('click', 'series', function (data) {
console.log(data)
})