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

Method do_update

js/src/widget.ts:1455–1478  ·  view source on GitHub ↗

* Handle Plotly.update request

()

Source from the content-addressed store, hash-verified

1453 * Handle Plotly.update request
1454 */
1455 do_update() {
1456 /** @type {Py2JsUpdateMsg} */
1457 var msgData: Py2JsUpdateMsg = this.model.get("_py2js_update");
1458
1459 if (msgData !== null) {
1460 var style = msgData.style_data || {};
1461 var layout = msgData.layout_data || {};
1462 var traceIndexes = (this.model as FigureModel)._normalize_trace_indexes(
1463 msgData.style_traces
1464 );
1465
1466 style["_doNotReportToPy"] = true;
1467 Plotly.update(this.el, style, layout, traceIndexes);
1468
1469 // ### Send trace deltas ###
1470 // We create an array of deltas corresponding to the updated
1471 // traces.
1472 this._sendTraceDeltas(msgData.trace_edit_id);
1473
1474 // ### Send layout delta ###
1475 var layout_edit_id = msgData.layout_edit_id;
1476 this._sendLayoutDelta(layout_edit_id);
1477 }
1478 }
1479
1480 /**
1481 * Handle Plotly.animate request

Callers 1

perform_renderMethod · 0.95

Calls 5

_sendTraceDeltasMethod · 0.95
_sendLayoutDeltaMethod · 0.95
getMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected