In Jupiter Notebook, there used to be an init_notebook_mode method that would inject the JS code into the page and HTML exports of a notebook would export the graphs as Javascript Objects.
With Jupyter Lab, this is no longer the case as Javascript code is not run. We’re meant to use the new FigureWidget objects from the API, and they display correctly in a Jupyter Lab notebook, but they do not work with HTML exports at all as they get converted to blank outputs.
Using iplot shows interactive output from the Jupyter Lab notebooks (through the @jupyterlab/plotly-extension), however exporting turns these interactive outputs into images.
Am I doing anything wrong here?
What is the recommended way of exporting Jupyter Lab notebooks that include interactive plot.ly graphs?
I saw your pull request and subscribed to it, yet I wasn’t sure it would fix this problem.
So just to make sure, as long as the plotly renderer widgets are installed, iplot doesn’t require init_notebook_mode anymore for rendering and exporting plot.ly JS graphs in Jupyter Lab?
And, these fixes were just merged and released in @jupyterlab/plotly-extension version 0.17.2. Give it a try and let me know if it does in fact fix the problem for you. Thanks!
On a side note, I’d point out for future reference that init_notebook_mode is required for the exported HTML to include the Plotly JS imports. @jupyterlab/plotly-extension only handles rendering from within Jupiter Lab (which makes sense)