MCPcopy Create free account
hub / github.com/alpha2phi/python-apps / callback

Function callback

sagemaker-dash/tutorials/app16.py:97–109  ·  view source on GitHub ↗
(selection1, selection2, selection3)

Source from the content-addressed store, hash-verified

95 Output('g3', 'figure'), Input('g1', 'selectedData'),
96 Input('g2', 'selectedData'), Input('g3', 'selectedData'))
97def callback(selection1, selection2, selection3):
98 selectedpoints = df.index
99 for selected_data in [selection1, selection2, selection3]:
100 if selected_data and selected_data['points']:
101 selectedpoints = np.intersect1d(
102 selectedpoints,
103 [p['customdata'] for p in selected_data['points']])
104
105 return [
106 get_figure(df, "Col 1", "Col 2", selectedpoints, selection1),
107 get_figure(df, "Col 3", "Col 4", selectedpoints, selection2),
108 get_figure(df, "Col 5", "Col 6", selectedpoints, selection3)
109 ]
110
111
112if __name__ == '__main__':

Callers

nothing calls this directly

Calls 1

get_figureFunction · 0.85

Tested by

no test coverage detected