Description Usage Arguments Examples
Currently for brush events to be triggered on a visualisation, you must
use a .brush
property. This limitation will be lifted in the future.
1 | handle_brush(vis, on_move = NULL, fill = "black")
|
vis |
Visualisation to listen to. |
on_move |
Callback function with arguments:
|
fill |
Colour of the brush. |
1 2 3 4 5 6 7 | # Display tooltip when objects are brushed
mtcars %>%
ggvis(x = ~wt, y = ~mpg, size.brush := 400) %>%
layer_points() %>%
handle_brush(function(items, page_loc, session, ...) {
show_tooltip(session, page_loc$r + 5, page_loc$t, html = nrow(items))
})
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.