rbokeh icon indicating copy to clipboard operation
rbokeh copied to clipboard

shiny callbacks lost when using grid_plot

Open tr8dr opened this issue 8 years ago • 1 comments

Due to the code in grid_plot which clears out tools in each figure, this also has the effect of losing callbacks set for a given tool function (for example tool_tap). I am not sure whether it is possible in institute tool_tap callbacks without the toolbar being visible?

This does not work, for example:

fig1<- figure() %>% ly_points(x = x, y = y, hover = list(x, y), lname = "points1") %>%
    tool_tap(shiny_callback("tap_info1"), "points1")
fig2<- figure() %>% ly_points(x = x, y = y, hover = list(x, y), lname = "points2") %>%
    tool_tap(shiny_callback("tap_info2"), "points2")
grid_plot(list(fig1, fig2), nrow=1, ncol=2)

I could not determine how to solve this in the code without leaving the toolbars on each facet in the grid. Perhaps you know of a way to suppress the toolbars without removing the tool functionality?

tr8dr avatar May 14 '17 19:05 tr8dr

Things get a little messy with multiple tools in a grid_plot so I don't think it will work. I'm working on a major internal overhaul right now that will hopefully simplify some of these things.

hafen avatar Jun 07 '17 04:06 hafen