Send manipulated data from plotly to R (using Shiny)

Hi,

I’m new to Plotly, but more experienced in R and Shiny and am looking to create faster interactive plots using Plotly instead of interactive ggplots (= slow).

How my app, using ggplot, currently works is by displaying a chart with datapoints, the user then selects the points of interest, presses a button and is taken to a next tab where the data linked to the selected points is used for further interaction and finally saved to a database.

I was able to understand how to create and update plots with plotly, but I don’t see how a click of a button can send the manipulated data from plotly on the client (e.g.which points were selected) back to the server ® for further processing and saving.

Kind regards