Is this possible with the selected_data plotly param? See: Bind selected_data param from plotly chart
selected_data