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]

屏幕截图或视频(可选)

企业微信截图_eb1af7ec-3c92-47b8-bba4-0de9a58ddecd

补充说明(可选)

No response


nice issue.

posted by hustcc 6 months ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests