Skip to content

group_by.plotly() doesn't retain crosstalk set information #1920

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cpsievert opened this issue Feb 16, 2021 · 0 comments
Closed

group_by.plotly() doesn't retain crosstalk set information #1920

cpsievert opened this issue Feb 16, 2021 · 0 comments

Comments

@cpsievert
Copy link
Collaborator

The core issue behind tidyverse/dplyr#5760 (example below) is that group_by.plotly() doesn't retain crosstalk set information

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant