victory icon indicating copy to clipboard operation
victory copied to clipboard

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

Open Zygro opened this issue 10 months ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Code of Conduct

  • [X] 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 avatar Apr 18 '24 15:04 Zygro

https://github.com/FormidableLabs/victory/assets/9499194/8db4e2ce-a1f2-4ca5-95c6-0d712dc56019

Zygro avatar Apr 18 '24 15:04 Zygro

This issue is stale because it has been open for 90 days with no activity. If there is no activity in the next 7 days, the issue will be closed.

github-actions[bot] avatar Jul 18 '24 00:07 github-actions[bot]

This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.

github-actions[bot] avatar Jul 26 '24 00:07 github-actions[bot]