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

[Tooltip] customTooltip provides incorrect header value #1988

Closed
nickofthyme opened this issue Mar 6, 2023 · 0 comments · Fixed by #1989
Closed

[Tooltip] customTooltip provides incorrect header value #1988

nickofthyme opened this issue Mar 6, 2023 · 0 comments · Fixed by #1989
Assignees
Labels
bug Something isn't working :tooltip Related to hover tooltip :xy Bar/Line/Area chart related

Comments

@nickofthyme
Copy link
Collaborator

nickofthyme commented Mar 6, 2023

Describe the issue

When using the customTooltip prop on the Tooltip spec, the props passed to the custom component are incorrect providing the wrong vertical position of the cursor.

https://codesandbox.io/s/vigilant-villani-5w6xxs?file=/src/App.js

Expected behaviour

The customTooltip is provided the header for the actively hovered element.

Screenshots

Screen Recording 2023-03-06 at 03 04 03 PM

Additional Context

This bug was introduced in v51.0.0 in #1782 with the addition of tooltip actions. Prior to this PR this inaccurate tooltip context would occur only when using a customTooltip with Tooltip.type set to vertical, where using follow would provide the correct context.

@nickofthyme nickofthyme added the bug Something isn't working label Mar 6, 2023
@nickofthyme nickofthyme self-assigned this Mar 6, 2023
@nickofthyme nickofthyme added :tooltip Related to hover tooltip :xy Bar/Line/Area chart related labels Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working :tooltip Related to hover tooltip :xy Bar/Line/Area chart related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant