antvis/G2

Do you want to work on this issue?
You can request for a bounty in order to promote it!
折线图通过监听事件chart.on('tooltip:show', (event) => {})回调返回的数据是上个日期,应该是当前选中的日期 #6511
Djj520Ztm posted onGitHub
问题描述
折线图通过监听事件chart.on('tooltip:show', (event) => {})回调返回的数据是上个日期,应该是当前选中的日期
重现链接
chart.on('tooltip:show', (event) => { const { x } = event?.data?.data || {} console.log('tooltip:show x: ', x) })
重现步骤
chart.on('tooltip:show', (event) => {
const { x } = event?.data?.data || {}
console.log('tooltip:show x: ', x)
})
预期行为
期望是当前选中的日期,但是回调返回的上个日期
平台
- 操作系统: [macOS, Windows, Linux, React Native ...]
- 网页浏览器: [Google Chrome, Safari, Firefox]
屏幕截图或视频(可选)
补充说明(可选)
No response