事件监听
click
const chart = echarts.init(document.getElementById('chart'))
chart.on('click', e => {
console.log(e)
})
注意:点击事件只有点击在数据图形上时才会触发。以折线图为例,见下图:
const chart = echarts.init(document.getElementById('chart'))
chart.on('click', e => {
console.log(e)
})
注意:点击事件只有点击在数据图形上时才会触发。以折线图为例,见下图: