-
Notifications
You must be signed in to change notification settings - Fork 2
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
Htmlwidgets within tabs apart from active tab do not load/size correctly #3
Comments
Thanks for using |
hmmmm, I just tried your code with |
Well actually, sometimes it does and sometimes it doesn't. |
Thank you for your answer! In the meantime, I had briefly stumbled across the fact that it sometimes worked in browsable but never in rmd, which I am dependent on because I need to create many html-files with different input. In the meantime, I have had to opt for flexdashboard as a workaround, which is a pity since the materializeR-layout is really beautiful. Thank you very much for you work! |
This should work,
|
I have an issue with some htmlwidgets embedded in tabs. When opening the html-document rendered with rmarkdown, the widget on the first tab is loaded correctly. The widget on the second tab, however, does not load correctly, unless/until the whole window is resized manually. When the window is resized manually, in return, the widget on the first tab does not work correctly anymore.
The problem - as I think I have understood - is that the size of the div in the "not-yet-loaded" tab is 0 when the graphs are rendered that the dygraph only receives a size when a resize is done manually on that very page.
I think adding some javascript that triggers a resizing when changing the tab (something with g.resize() ) might to the trick here, but without advanced js-skills, I have not succeeded in trying to do so.
`
R-Markdown-Code for replication:
output: html_document
`
I would be most grateful for any help.
The text was updated successfully, but these errors were encountered: