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

Method _handler_js2py_restyle

plotly/basewidget.py:548–573  ·  view source on GitHub ↗

Process Plotly.restyle message from the frontend

(self, change)

Source from the content-addressed store, hash-verified

546
547 @observe("_js2py_restyle")
548 def _handler_js2py_restyle(self, change):
549 """
550 Process Plotly.restyle message from the frontend
551 """
552
553 # Receive message
554 # ---------------
555 restyle_msg = change["new"]
556
557 if not restyle_msg:
558 self._js2py_restyle = None
559 return
560
561 style_data = restyle_msg["style_data"]
562 style_traces = restyle_msg["style_traces"]
563 source_view_id = restyle_msg["source_view_id"]
564
565 # Perform restyle
566 # ---------------
567 self.plotly_restyle(
568 restyle_data=style_data,
569 trace_indexes=style_traces,
570 source_view_id=source_view_id,
571 )
572
573 self._js2py_restyle = None
574
575 @observe("_js2py_update")
576 def _handler_js2py_update(self, change):

Callers

nothing calls this directly

Calls 1

plotly_restyleMethod · 0.80

Tested by

no test coverage detected