moumyu
Results
comments of
moumyu
@hustcc 其实都有问题,zr监听的是全局点击事件。如果记录了lastTipIndex后,点击了非数据图的位置也会响应
可以配合hideTip事件清空lastTipIndex ```javascript var lastTipIndex = null; chart.on('showTip', function(event) { lastTipIndex = event.dataIndex; }); chart.on('hideTip', function(event) { lastTipIndex = null; }); chart.getZr().on('click', function() { if (dataIndex != null) { // 执行点击事件动作...