Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

折线图通过监听事件chart.on('tooltip:show', (event) => {})回调返回的数据是上个日期,应该是当前选中的日期 #6511

Open
Djj520Ztm opened this issue Oct 29, 2024 · 1 comment
Assignees
Labels

Comments

@Djj520Ztm
Copy link

问题描述

折线图通过监听事件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

@hustcc
Copy link
Member

hustcc commented Nov 1, 2024

nice issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

4 participants
@hustcc @lxfu1 @Djj520Ztm and others