MCPcopy Index your code
hub / github.com/plotly/plotly.py / autosizeFigure

Method autosizeFigure

js/src/widget.ts:965–975  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

963 }
964
965 autosizeFigure() {
966 var that = this;
967 var layout = that.model.get("_widget_layout");
968 if (_.isNil(layout) || _.isNil(layout.width)) {
969 // @ts-ignore
970 Plotly.Plots.resize(that.el).then(function () {
971 var layout_edit_id = that.model.get("_last_layout_edit_id");
972 that._sendLayoutDelta(layout_edit_id);
973 });
974 }
975 }
976
977 /**
978 * Purge Plotly.js data structures from the notebook output display

Callers 1

_processLuminoMessageMethod · 0.95

Calls 3

getMethod · 0.45
resizeMethod · 0.45
_sendLayoutDeltaMethod · 0.45

Tested by

no test coverage detected