-
Notifications
You must be signed in to change notification settings - Fork 33
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
Notebook Display Outputs Unrenderable in Conversion #129
Comments
The repr_*.htmlwidget code is here: https://github.com/IRkernel/repr/blob/master/R/repr_htmlwidget.r The way it works is that it creates standalone single page HTML code (e.g. embedding all scripts as data:urls) and publishes it with Jupyter’s
For the special case of plotly: Since there’s a special plotly rendering plugin for Jupyter lab, that’s why things work fine in the front-end. Plotly plots don’t go through the generic htmlwidget rendering function but a special hand-crafted renderer. |
Hmm no it doesn't. I found the issue you made for that jupyter/nbconvert#129 which predated my involvement in nbconvert. If we need this to enable what's needed I could look into what's needed to add that into the 6.0 release that's wrapping up soonish.
Yeah though that usually makes it fairly unfriendly for other Jupyter front-ends and for any headless executions as it's lab specific, so it helps if there's a fallback for other interfaces to have a functional solution. |
Yeah, so I guess there’s nothing repr can do here. I’ll leave this open in case we think of something to do more elegantly here. |
A replication from github.com/plotly/plotly.R/issues/1763 where the issue could not be addressed directly.
When using R Plotly in a Jupyter Notebook, the interactive widgets will not appear in the output when using nbconvert to transform it to html.
Console in the browser says: Uncaught ReferenceError: Plotly is not defined.
More details from that thread led to posting in this project, but essentially the html outputs in the cell aren't renderable without javascript extensions present, which on a plain html file don't exist.
Furthermore, looking through the file it seems like every script associated has a the png embeded into the html, causing the rendering to be duplicated on every media type including text. You likely want to only render the PNG on the image output and leave the other with the raw data to reproduce to PNG. This causes a multi-kilobyte display output to take megabytes of space.
I'm cross posting this with https://github.com/ramnathv/htmlwidgets as I'm not familiar enough the packages here to know where changes would need to be made.
The text was updated successfully, but these errors were encountered: