WayneGitShell / GWSDAT

GroundWater Spatiotemporal Data Analysis Tool (GWSDAT) R-Shiny implementation.
https://stats-glasgow.shinyapps.io/GWSDAT
31 stars 7 forks source link

Replot Spatial Plot as soon as 1. enter spatial plot tab _and_ 2. 'PlumLimEntry' changed #89

Closed andrejadd closed 7 years ago

andrejadd commented 7 years ago

PlumLimEntry should be an reactive element and renderPlot the observer for it.

Or just invalidate the plot if enter into tab and change of PlumLimEntry detected.

andrejadd commented 7 years ago

solution: created an reactive function:

optionsSaved <- reactive({ 
    input$save_analyse_options 
  })

and call it inside the RenderPlot() function:

val <- optionsSaved()

Thus renderPlot() will be called if input$save_analyse_options changes and if the renderPlot observer is in the current context (shown in the panel).