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

Method _handler_js2py_update

plotly/basewidget.py:576–603  ·  view source on GitHub ↗

Process Plotly.update message from the frontend

(self, change)

Source from the content-addressed store, hash-verified

574
575 @observe("_js2py_update")
576 def _handler_js2py_update(self, change):
577 """
578 Process Plotly.update message from the frontend
579 """
580
581 # Receive message
582 # ---------------
583 update_msg = change["new"]
584
585 if not update_msg:
586 self._js2py_update = None
587 return
588
589 style = update_msg["style_data"]
590 trace_indexes = update_msg["style_traces"]
591 layout = update_msg["layout_data"]
592 source_view_id = update_msg["source_view_id"]
593
594 # Perform update
595 # --------------
596 self.plotly_update(
597 restyle_data=style,
598 relayout_data=layout,
599 trace_indexes=trace_indexes,
600 source_view_id=source_view_id,
601 )
602
603 self._js2py_update = None
604
605 @observe("_js2py_relayout")
606 def _handler_js2py_relayout(self, change):

Callers

nothing calls this directly

Calls 1

plotly_updateMethod · 0.80

Tested by

no test coverage detected