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

Method _send_points_callback_message

js/src/widget.ts:1317–1335  ·  view source on GitHub ↗

* Build and send a points callback message to the Python side * * @param {Object} data * data object as provided by the plotly_click, plotly_hover, * plotly_unhover, or plotly_selected events * @param {String} event_type * Name of the triggering event. One of 'plotly_click',

(data: any, event_type: string)

Source from the content-addressed store, hash-verified

1315 * @private
1316 */
1317 _send_points_callback_message(data: any, event_type: string) {
1318 if (data === null || data === undefined) {
1319 // No data to report to the Python side
1320 return;
1321 }
1322
1323 /** @type {Js2PyPointsCallbackMsg} */
1324 var pointsMsg: Js2PyPointsCallbackMsg = {
1325 event_type: event_type,
1326 points: this.buildPointsObject(data),
1327 device_state: this.buildInputDeviceStateObject(data),
1328 selector: this.buildSelectorObject(data),
1329 };
1330
1331 if (pointsMsg["points"] !== null && pointsMsg["points"] !== undefined) {
1332 this.model.set("_js2py_pointsCallback", pointsMsg);
1333 this.touch();
1334 }
1335 }
1336
1337 /**
1338 * Stub for future handling of plotly_doubleclick

Callers 5

handle_plotly_clickMethod · 0.95
handle_plotly_hoverMethod · 0.95
handle_plotly_unhoverMethod · 0.95

Calls 5

buildPointsObjectMethod · 0.95
buildSelectorObjectMethod · 0.95
touchMethod · 0.95
setMethod · 0.45

Tested by

no test coverage detected