crosstalk
crosstalk copied to clipboard
Is it possible to remove a selection made by `filter_select`?
After creating a figure (see code below) all points are displayed. Making a selection displays the selected points only. But how to remove the selection, to display all points, without reloading the page? Tried deleting all selection, double clicking, but nothing works except reloading page.
library(plotly)
foo <- data.frame(foo = c("A","B","C"), fc = c(2,3,-1), val = c(0.1,0.01,0.4))
shared_prot <- SharedData$new(foo, ~foo, group = "Choose protein")
x <- filter_select("foo", "Foo :", shared_prot, ~foo)
p <- plot_ly(shared_prot, x = ~fc, y = ~ val , type="scatter" , mode="markers") %>% highlight("plotly_click")# %>% add_markers()
bscols(x,p)
best regards
But how to remove the selection, to display all points, without reloading the page?
I assume you mean the "filter" selection (i.e., selection via the dropdown). I'd say this should be possible by going in and deleting each selected item until the dropdown is cleared, but plotly currently doesn't handle that event properly. I filed an issue here https://github.com/ropensci/plotly/issues/1346