Implementing tooltip for networkD3 app
I want to implement a tooltip in Shiny-hosted networkD3 plot similar to the ggvis function, e.g: require(ggvis); require(shiny) all_values = function(x){ "<a href='#'>Option 1</a><br/><a href='#'>Option 2</a>"} server = function(input, output, session) { observe({ ggvis(mtcars, ~disp, ~mpg) %>% layer_points() %>% add_tooltip(all_values, 'click') %>% bind_shiny('ggvis_plot', 'ggvis_ui') }) } ui = fluidPage( uiOutput("ggvis_ui"), ggvisOutput("ggvis_plot")) shinyApp(ui, server) Is there an elegant Shiny or D3/javascript way to achieve this for a simple networkD3 plot - such as below? library