Skip to content

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

Closed
@cpsievert

Description

@cpsievert

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions