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

Method handle_plotly_update

js/src/widget.ts:1239–1261  ·  view source on GitHub ↗

* Handle plotly_update events emitted by the Plotly.js library * @param data

(data: any)

Source from the content-addressed store, hash-verified

1237 * @param data
1238 */
1239 handle_plotly_update(data: any) {
1240 if (data === null || data === undefined) {
1241 // No data to report to the Python side
1242 return;
1243 }
1244
1245 if (data["data"] && data["data"][0].hasOwnProperty("_doNotReportToPy")) {
1246 // Update originated on the Python side
1247 return;
1248 }
1249
1250 /** @type {Js2PyUpdateMsg} */
1251 var updateMsg: Js2PyUpdateMsg = {
1252 style_data: data["data"][0],
1253 style_traces: data["data"][1],
1254 layout_data: data["layout"],
1255 source_view_id: this.viewID,
1256 };
1257
1258 // Log message
1259 this.model.set("_js2py_update", updateMsg);
1260 this.touch();
1261 }
1262
1263 /**
1264 * Handle plotly_click events emitted by the Plotly.js library

Callers 1

perform_renderMethod · 0.45

Calls 2

touchMethod · 0.95
setMethod · 0.45

Tested by

no test coverage detected