I have a scatterd3 (package scatterd3) plot in a shiny app and I can't figure out how to pass information after clicking a plotted point back to shiny though. This website seems to explain it but I just can't get it: https://cran.r-project.org/web/packages/scatterD3/vignettes/introduction.html#javascript-callback-on-clicking-point
scatterD3(data = mtcars, x = wt, y = mpg,
click_callback = "function(id, index) {
if(id && typeof(Shiny) != 'undefined') {
Shiny.onInputChange(id + '_selected', index);
}
}")
Do you know where the information on click is stored? I assumed I could call it in shiny gui with something like this:
verbatimTextOutput("scatterPlot$index")
Any ideas? Cheers