-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Milestone
Description
Since updating dplyr, a plotly chart linked with a slider and a checkbox via crosstalk does not react to the controls any more. The following code works with dplyr version 1.0.2. In versions 1.0.3 and 1.0.4 I need to comment out the group_by() statement to make it work.
(In my use case, group_by() is more useful than in this minimal example. A flexdashboard created on January 13 worked fine. Knitting the same unchanged code now gives me the same plots, no errors or warnings, and no interactivity. My temporary solution is to use renv and stick with dplyr 1.0.2 for that project.)
library(plotly)
library(crosstalk)
shared_data <- mtcars %>%
SharedData$new()
p <- shared_data %>%
plot_ly(x = ~mpg, y = ~hp) %>%
group_by(am) %>%
add_markers()
bscols(list(
filter_slider(id = "mpg", label = "Miles per Gallon",
sharedData = shared_data, column = "mpg"),
filter_checkbox(id = "am", label = "Automatic / Manual",
sharedData = shared_data, group = ~am)),
p)
# Works with dplyr 1.0.2
# Works with dplyr 1.0.3 and 1.0.4 only if group_by() is commented outMetadata
Metadata
Assignees
Labels
No labels