I have a plot that is frequently updated in my shiny application. A reactive function xyClick()
, that depends on input$plot_click
, transforms the click values in useful things, and gets called to fill a tableOutput
object with several info connected to the clicked point.
Shiny seems to reset click events every time the plot is updated, even if it is only the colors that have changed. I do not want this! I need the click values to be kept the same, up to when a new click is issued.
Which is the best way to accomplish this? Should I find a way to store the previous click and update it when a new click is issued? Should the stored click be a reactiveValue
, and not a reactive()
expression?