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

[Bug]: 弹性条形图 tooltip 拾取错误 #6720

Open
2 of 10 tasks
BQXBQX opened this issue Mar 28, 2025 · 3 comments · May be fixed by #6738
Open
2 of 10 tasks

[Bug]: 弹性条形图 tooltip 拾取错误 #6720

BQXBQX opened this issue Mar 28, 2025 · 3 comments · May be fixed by #6738
Labels
bug 🐛 Something isn't working

Comments

@BQXBQX
Copy link
Contributor

BQXBQX commented Mar 28, 2025

Describe the bug / 问题描述

官网弹性条形图

Image

当鼠标放到 德国 英国 法国的右半边 rect 时,tootip 拾取错误。

Reproduction link / 复现链接

https://g2.antv.antgroup.com/zh/examples/general/interval/#bar-flex

Steps to Reproduce the Bug or Issue / 重现步骤

当鼠标放到 德国 英国 法国的右半边 rect 时,tootip 拾取错误。

Version / 版本

🆕 5.x

OS / 操作系统

  • macOS
  • Windows
  • Linux
  • Others / 其他

Browser / 浏览器

  • Chrome
  • Edge
  • Firefox
  • Safari (Limited support / 有限支持)
  • IE (Nonsupport / 不支持)
  • Others / 其他
@BQXBQX BQXBQX added the waiting for maintainer Triage or intervention needed from a maintainer label Mar 28, 2025
@hustcc
Copy link
Member

hustcc commented Mar 29, 2025

感觉可能和之前的 tooltip 修改有关系,这个图的 tooltip 拾取需要走图形拾取,而不是数据的拾取。

@BQXBQX
Copy link
Contributor Author

BQXBQX commented Mar 29, 2025

Image 是新的问题导致的,当 rect 的长度每个 item 不想等时,getBandWidth 方法错误,应该传入正确的 xDomain 才能拿到正确的宽度,现在没有传入 props,所以只拿到第一个数据的 bandwidth 作为通用的 bandwidth。

@interstellarmt interstellarmt added bug 🐛 Something isn't working and removed waiting for maintainer Triage or intervention needed from a maintainer labels Mar 31, 2025
@interstellarmt
Copy link
Contributor

related: #6516
对于flex转换后的tooltip拾取的时候要做特殊处理,不能按等步长处理。

@BQXBQX BQXBQX linked a pull request Apr 3, 2025 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants