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

In a responsive chart with Voronoi and Zoom, tooltips are shown for an offset cursor, if a re-render is triggered during zooming #2857

Open
2 tasks done
Zygro opened this issue Apr 18, 2024 · 1 comment
Labels
Type: Bug 🐛 Oh no! A bug or unintentional behavior

Comments

@Zygro
Copy link

Zygro commented Apr 18, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct

Victory version

37.0.2

Code Sandbox link

https://codesandbox.io/p/github/Zygro/victory-demo/main

Bug report

If I trigger a re-render during zoom, for example with a `onZoomDomainChange={setZoomDomain}`, the tooltips from a `VictoryVoronoiZoomContainer` will not diplay for the correct point that the cursor is ponting to, but the cursor for the tooltips seems to have an offset from the real cursor.

This issue does not occur in `responsive={false}` charts.

Steps to reproduce

No response

Expected behavior

Tooltips are shown on the points on which the cursor is pointing

Actual behavior

Tooltips are shown on wrong points, if at all. The Voronoi container seems to think that the cursor is somewhere else than it really is.

Environment

- Device: Desktop
- Browser: Chrome
- OS: Mac OS Ventura 13.6.6 
- Node: 18.6.0
- npm: 8.13.2
@Zygro Zygro added the Type: Bug 🐛 Oh no! A bug or unintentional behavior label Apr 18, 2024
@Zygro
Copy link
Author

Zygro commented Apr 18, 2024

Screen.Recording.2024-04-18.at.17.04.53.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug 🐛 Oh no! A bug or unintentional behavior
Projects
None yet
Development

No branches or pull requests

1 participant