获取echarts实例
this.echarts.on('click',function(){
console.log('xxx')
})
这里点击事件只对数据记录 (例如:折线图的折点)触发,用户体验很不好
可以使用 chart.getZr()方法
this.echarts.off() ;//防止多次触发
this.echarts.getZr().on('click',function(){
console.log('扩大了点击范围')
})```
获取echarts实例
this.echarts.on('click',function(){
console.log('xxx')
})
这里点击事件只对数据记录 (例如:折线图的折点)触发,用户体验很不好
可以使用 chart.getZr()方法
this.echarts.off() ;//防止多次触发
this.echarts.getZr().on('click',function(){
console.log('扩大了点击范围')
})```