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

fix(tooltip): find closest for band scale #5564

Merged
merged 1 commit into from Sep 19, 2023
Merged

Conversation

pearmini
Copy link
Member

@pearmini pearmini commented Sep 19, 2023

close: #5543

存在问题

双轴图,存在 Item Mark(比如 Interval)和 Series Mark(比如 Line)的时候会有问题:

  • 没有拾取到 line 到数据:
  • 没有拾取到 interval 的数据:

出现原因

  • Series Mark 默认不会去拾取超出范围的元素的数据
  • Item Mark 默认只会拾取包含鼠标位置的元素的数据

解决办法

当是 Band 比例尺的时候,Series tooltip 找到最近的元素。

TODO

  • code
  • docs
  • examples
  • tests

@pearmini pearmini changed the title feat(tooltip): support closest fix(tooltip): find closest for band scale Sep 19, 2023
@coveralls
Copy link

Pull Request Test Coverage Report for Build 6233042899

  • 17 of 22 (77.27%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.01%) to 88.468%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/interaction/tooltip.ts 17 22 77.27%
Totals Coverage Status
Change from base Build 6230758416: -0.01%
Covered Lines: 9977
Relevant Lines: 10916

💛 - Coveralls

@pearmini pearmini merged commit e543e0e into v5 Sep 19, 2023
3 checks passed
@pearmini pearmini deleted the feat/tooltip-closest branch September 19, 2023 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

【v5】tooltip share 打开,有时会不共享
3 participants