rbokeh
rbokeh copied to clipboard
x_range and y_range callbacks do not activate
In the rbokeh/man-roxygen/ex-callback.R shiny demo app, callbacks are set up to trigger a shiny output when the x or y range changes:
output$rbokeh <- renderRbokeh({
figure() %>% ly_points(x = x, y = y, data = dat, hover = list(x, y), lname = "points") %>%
tool_hover(shiny_callback("hover_info"), "points") %>%
tool_tap(shiny_callback("tap_info"), "points") %>%
tool_box_select(shiny_callback("selection_info"), "points") %>%
x_range(callback = shiny_callback("x_range")) %>%
y_range(callback = shiny_callback("y_range"))
The hover_info and selection_info callbacks trigger properly, but the x_range and y_range do not receive any callbacks. This was tested on both safari and chrome on both a macbook pro (10.11) and mac pro (10.12.4).
Some diagnostics I tested x_range callbacks to javascript and this worked.
figure() %>%
ly_points(1:10) %>%
x_range(callback = "console.log('hi')")
When I ran the console_callback() below, I received an error message in the console per callback (as shown in the attached image below the code).
figure() %>%
ly_points(1:10) %>%
x_range(callback = console_callback()) %>%
y_range(callback = console_callback())
The error messages were of the sort:

So I wonder whether there is a bug in marshaling the parameters for the shiny callback, much as seen in the above console_callback.