Skip to content

Commit 8e1a602

Browse files
committed
use our JSON encoder
1 parent feca305 commit 8e1a602

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plotly/widgets/graph_widget.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
from IPython.utils.traitlets import Unicode
99
from IPython.display import Javascript, display
1010

11+
from plotly import utils
12+
1113
# Load JS widget code
1214
# No officially recommended way to do this in any other way
1315
# http://mail.scipy.org/pipermail/ipython-dev/2014-April/013835.html
@@ -95,7 +97,7 @@ def _handle_outgoing_message(self, message):
9597
else:
9698
message['graphId'] = self._graphId
9799
message['uid'] = str(uuid.uuid4())
98-
self._message = json.dumps(message)
100+
self._message = json.dumps(message, cls=utils.PlotlyJSONEncoder)
99101

100102
def on_click(self, callback, remove=False):
101103
"""Register a callback to execute when the graph is clicked.

0 commit comments

Comments
 (0)