You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use crosstalk to filter a plotly chart. I use crosstalk's filter_select to (un)filter a plotly chart. When using the reprex below trying to select a flower (e.g. setosa), all works fine. But when I unselect the flower, the values are not 'returned' to the plotly chart. Selecting '(All)' does not seem to be working either. The values reappear only when deselecting from flower filter AND ticking TRUE in the helper_select_all. I asked a question about this on StackOverflow, but there do not seem to be any answer until now.
library(crosstalk)
library(plotly)
df <- iris
df$helper_select_all <- T
shared_data <- SharedData$new(df)
filter <- bscols(
list(
filter_select("flower", "Select a flower", shared_data, ~Species),
filter_checkbox(
"helper_select_all",
label = "Reset filtering as deselecting from 'Select a flower' is not working",
shared_data, ~helper_select_all)
)
)
p <- plot_ly(shared_data, x = ~Sepal.Length, y = ~Sepal.Width) %>%
add_markers()
bscols(filter, p)
This picture demonstrates the issue as no filtering value is selected, but a part of the data is missing.
This picture shows what it looks like when all datapoints are present.
"(All)" does not seem to be working either.
The text was updated successfully, but these errors were encountered:
+1
Deselecting does not refresh the plot.
And selecting (All) gives JS error: input_selectize.js:40 Uncaught TypeError: Cannot read property 'forEach' of undefined
I am trying to use
crosstalk
to filter aplotly
chart. I usecrosstalk
'sfilter_select
to (un)filter aplotly
chart. When using the reprex below trying to select a flower (e.g. setosa), all works fine. But when I unselect the flower, the values are not 'returned' to theplotly
chart. Selecting '(All)' does not seem to be working either. The values reappear only when deselecting from flower filter AND ticking TRUE in the helper_select_all. I asked a question about this on StackOverflow, but there do not seem to be any answer until now.This picture demonstrates the issue as no filtering value is selected, but a part of the data is missing.
This picture shows what it looks like when all datapoints are present.
"(All)" does not seem to be working either.
The text was updated successfully, but these errors were encountered: