-
Notifications
You must be signed in to change notification settings - Fork 10
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
Plotly widgets do not work #19
Comments
The fix for this should now be in production. The result of the notebook in googlecolab/colabtools#498 (comment) |
Hi @blois, as your screenshot shows, only the static plot is produced; the widgets that control it do not appear (they only do so when the block is run with @kylebarron dug into this a bit here, but my inexperience has prevented me from diving in further, though I'd be happy to dig deeper if you can point me in the right direction. Is the issue something that needs to be addressed on the Colab side, or does it require that I create an issue in the Plotly repo? |
@cardinalgeo I think this is more of a Plotly question, possibly related to https://plotly.com/python/renderers/#setting-the-default-renderer? Just so I understand with a simpler example, starting with: from google.colab import output
output.enable_custom_widget_manager()
import plotly.graph_objects as go
f = go.FigureWidget() There are effectively two mechanisms to display: # renderer='colab' is the default in Colab, but can be tweaked.
f.show(renderer="colab") and: display(f) In the first, Plotly is returning a combination of HTML & JS which is rendered. But it sounds like you're looking for I may be misunderstanding this though. |
From my reading of Plotly's codebase, |
Hi guys. Any update on this? |
From googlecolab/colabtools#498 (comment)
The issue is that the current version (1.4.0) targets Phosphor and relies on
processPhosphorMessage
being called:https://github.com/plotly/plotly.py/blob/df19fc702b309586cc24e25373b87e8bdbb3ff60/packages/javascript/jupyterlab-plotly/src/Figure.ts#L907
This package currently targets widgets 5.0.0 which has not yet had a stable release. In 5.0 Phosphor was renamed to Lumino and all related methods were renamed as well. See jupyter-widgets/ipywidgets@a558dac.
colab-cdn-widget-manager/src/manager.ts
Line 192 in 6af7a6e
This is similar to #12.
The text was updated successfully, but these errors were encountered: