Skip to content

inherit = FALSE does not respect crosstalk SharedData  #1242

Closed
@cpsievert

Description

@cpsievert
library(plotly)
library(crosstalk)

txhousing %>%
  group_by(city) %>%
  SharedData$new(~city, "Select a city") %>%
  plot_ly(x = ~date, y = ~median) %>%
  add_lines(alpha = 0.2) %>%
  add_ribbons(
    x = c(2016, 2017), ymin = c(150000, 160000), ymax = c(200000, 190000),
    inherit = FALSE
  )
Error: Columns `x`, `ymin`, `ymax` must be length 1 or 8602, not 2, 2, 2

This error isn't very helpful -- the error is occuring because the ribbon trace is inheriting the crosstalk key, but it shouldn't...

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