-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[charts] Tooltip: 'TypeError: series is undefined' with updating series #15065
Comments
Effectively, that's not a use case we anticipated. Here is a minimal reproduction from what I understood https://codesandbox.io/embed/8wcxsg?module=/src/Demo.tsx&fontsize=12 The root cause is that the tooltip content comes from the This state is maintained up to date by entering/leaving pointer events. But because you remove the series, the state gets outdated. Checking is the series still exist is a solution. But cleaning the internal state when a series gets removed could be more efficient. Still need to find where to place such logic |
added this to the board to not lose track of it. 👍🏼 |
We will try to solve this issue by checking when a component unmout, itremoves himseft from the interaction context, the same way it does when pointer-out is trigger |
Other options we could test. Which seems more robust to new element being added under the pointer https://stackoverflow.com/questions/8813051/determine-which-element-the-mouse-pointer-is-on-top-of-in-javascript |
While updating series and changing tooltip state, may encounter a javascript error
May appear while
Issue seems to appear because of accessing context by seriesId, that could be removed in the moment of tooltip rendering call
Consider adding undefined check to props of a tooltip, implement a proper GC in SeriesContext or calculate tooltip series outside of its render
Search keywords:
The text was updated successfully, but these errors were encountered: