Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c55f2a9

Browse files
committed
Patch to display plotly graph widgets on notebook > v4.2
Found here 79a6426
1 parent 4b45341 commit c55f2a9

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

plotly/package_data/graphWidget.js

Lines changed: 21 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plotly/widgets/graph_widget.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
from requests.compat import json as _json
1010

1111
# TODO: protected imports?
12-
from IPython.html import widgets
13-
from IPython.utils.traitlets import Unicode
12+
# from IPython.html import widgets
13+
# from IPython.utils.traitlets import Unicode
14+
import ipywidgets as widgets
15+
from traitlets import Unicode
1416
from IPython.display import Javascript, display
1517

1618
import plotly.plotly.plotly as py
@@ -33,6 +35,7 @@ class GraphWidget(widgets.DOMWidget):
3335
Notebooks.
3436
"""
3537
_view_name = Unicode('GraphView', sync=True)
38+
_view_module = Unicode('GraphViewModule', sync=True)
3639
_message = Unicode(sync=True)
3740
_graph_url = Unicode(sync=True)
3841
_new_url = Unicode(sync=True)

0 commit comments

Comments
 (0)