-
Notifications
You must be signed in to change notification settings - Fork 721
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
XYChart Tooltip not working in Iframe #1838
Comments
@hshoff, @williaster, @mtlewis Sorry for pestering. Anyone of you who could help on a consulting basis on the above and some other things? Or happy to donate to the project or charity for help with this one. 🙏 It's proven a bit of a blocker for us. |
I did some more debugging @williaster. The mouseover is firing as expected but the svgPoint = null: This seems to be because the useEventHandlers is not called. Essentially the XYChart is not rerendering.
What is it that should cause the XYChart to rerender on mousemove fundamentally? Is it that the TooltipProvider changes? Or is there some other effect that is not triggering here? |
Found the issue! "event.nativeEvent instanceof Event" is not working as expected within the iframe context:
AI helped me explain why ...
When I patch this, the Tooltips show up as expected. But the next issue I'm facing is with:
I think this is a smaller fix to account for this scenario. Can I submit a PR that aims to fix both of these? Thank you! |
Hey @lapidus thanks much for digging in here - was initially surprised at this behavior but that makes complete sense. We would happily review a PR with the 2x fixes mentioned. |
Thank you @williaster! I made some progress on the PR: Now the tooltip shows almost correctly.
I tried correcting for the iframe offsets here: Appreciate if you can take a closer look. Thank you. |
Here's a minimal example:
CodeSandbox
Appreciated if you could take a quick look @williaster 🙏 Is it possible to workaround?
I'm essentially putting the standard XYChart example inside an iframe, and the tooltip is not firing.
The text was updated successfully, but these errors were encountered: