Skip to content

Commit 21bc09c

Browse files
committed
Force use of application/vnd.jupyter.widget-view+json in BaseFigureWidget
1 parent a7ce37f commit 21bc09c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

packages/python/plotly/plotly/basewidget.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,18 @@ def _repr_html_(self):
739739
"""
740740
raise NotImplementedError # Prefer _repr_mimebundle_
741741

742+
def _repr_mimebundle_(self, include=None, exclude=None, validate=True, **kwargs):
743+
"""
744+
Return mimebundle corresponding to default renderer.
745+
"""
746+
return {
747+
"application/vnd.jupyter.widget-view+json": {
748+
"version_major": 2,
749+
"version_minor": 0,
750+
"model_id": self._model_id,
751+
},
752+
}
753+
742754
def _ipython_display_(self):
743755
"""
744756
Handle rich display of figures in ipython contexts

0 commit comments

Comments
 (0)