-
Notifications
You must be signed in to change notification settings - Fork 351
With revealjs, plotly tooltip not aligned correctly #2430
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
Comments
I'm pretty sure this is happening because the tooltip is using units that are getting affected by the @jjallaire This is a big change, but I think we should consider forking revealjs and reworking their setup so we never have a |
The counterpoint to this is that the |
I see, that makes sense, thanks. The issue comes from HTML libraries that love to inject transient DOM nodes (tooltips, for example; I see the same thing with mermaidjs) at the end of the body or somewhere else where they try to get absolute positioning. Then, the fact that they inject the DOM node in a place with a different transform makes it impossible to line them up. I wonder if, instead, we can make the transform node take more of the DOM, so that these libraries can't accidentally escape it. |
Just to share some references as we had related issue in the R package at some point and it was fixed in plotly.js directly. New plotly.js has been available in plotly R package v4.10.0 However, it seems a new issue already reported in plotly and reveal.js
In short, I believe this has been fixed upstream in reveal.js already and Possibly using this commit or master for our embed reveal.js, or patching it will solve the issue here.. |
… JS lib Current version use `zoom` attributes which messes up JS lib like plotly. This new version using `scale()` transform only. Fixes #2430
I confirm that using the hakimel/reveal.js@e281b32 for the revealjs version, change the scaling and fix the issue. In HTML we had <div class="slides" style="width: 1050px; height: 700px; zoom: 1.69843;">
<!-- slides in there-->
</div> which becomes <div class="slides" style="width: 1050px; height: 700px; inset: 50% auto auto 50%; transform: translate(-50%, -50%) scale(1.69843);">
<!-- slides in there-->
</div> See the PR #2437 for a branch with the updated revealjs that fixed the issue. I share this as an example that upstream seems to have fixed this scaling issue. |
I still seem to experience this issue with vega-altair plots |
@timbmg this is highly possible as the original issue was a conflict in revealjs and plotly. Both being JS libraries with there own feature and configuration. It is possible that this is the same for vega-altair too. Can you open a new issue to track ? Investigation will be the following then:
Thanks. |
plotly tooltip misaligned in quarto with revealjs
Rendering the following example results in an html file where the tooltip is off-center. You would need to position the pointer above and to the left of the point you want to select in order to view the information for that data point. I tried opening it in Microsoft Edge and Google Chrome and both had this issue.
Additional information:
Version of quarto: 1.1.189
Operating system: Windows 10 Enterprise
IDE you’re using, and its version: RStudio version 2022.7.1.554
Checklist
The text was updated successfully, but these errors were encountered: