Browse code

resets plot3 when plot1 is clicked

pablo-rodr-bio2 authored on 28/04/2021 07:15:54
Showing1 changed files

... ...
@@ -129,6 +129,12 @@ function(input, output, session) {
129 129
   plot2_Server("plot2", eventData1, rv)
130 130
 
131 131
   # PLOT3 RENDER
132
+  
133
+  ## Whenever the user clicks on the first plot, the third one resets
134
+  observeEvent(eventData1(), {
135
+    runjs("Shiny.setInputValue('plotly_click-click2', null);")
136
+  })
137
+  
132 138
   eventData2 <- reactive({
133 139
     req(rv$p2)
134 140
     ind <- event_data("plotly_click", source = "click2")