Skip to content

Commit be81b16

Browse files
committed
Add to_json_plotly instrumentation to make_figure and fig.update
1 parent b4946a2 commit be81b16

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Diff for: packages/python/plotly/plotly/basedatatypes.py

+5
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,11 @@ def update(self, dict1=None, overwrite=False, **kwargs):
916916
BaseFigure._perform_update(self[k], v)
917917
else:
918918
self[k] = v
919+
920+
# instrumentation
921+
from plotly.io._json import to_json_plotly
922+
to_json_plotly(self)
923+
919924
return self
920925

921926
def pop(self, key, *args):

Diff for: packages/python/plotly/plotly/express/_core.py

+5
Original file line numberDiff line numberDiff line change
@@ -2065,6 +2065,11 @@ def make_figure(args, constructor, trace_patch=None, layout_patch=None):
20652065

20662066
configure_axes(args, constructor, fig, orders)
20672067
configure_animation_controls(args, constructor, fig)
2068+
2069+
# instrumentation
2070+
from plotly.io._json import to_json_plotly
2071+
to_json_plotly(fig)
2072+
20682073
return fig
20692074

20702075

0 commit comments

Comments
 (0)