Skip to content

highlight() selectize payload isn't correct when non-crosstalk traces appear before crosstalk traces #2218

Closed

Description

@cpsievert

For example, this results in an empty payload, when it should be populated

p <- plot_ly() %>%
  add_lines(data = mtcars, x = ~wt, y = ~mpg) %>%
  add_markers(
    data = highlight_key(mtcars, ~cyl, "Choose cylinder"),
    x = ~wt, y = ~mpg
  ) %>%
  highlight(selectize = TRUE)

plotly_build(p)$x$selectize
NULL

Interestingly, if you remove the add_lines() trace, you get the correct result of:

$a5634ffecff7b115d858cad5b9126e93
$a5634ffecff7b115d858cad5b9126e93$items
  value label
1     6     6
2     4     4
3     8     8

$a5634ffecff7b115d858cad5b9126e93$group
[1] "Choose cylinder"

Activity

  1. added a commit that references this issue on Dec 30, 2022
    5f46396
  2. added a commit that references this issue on Dec 30, 2022
    8f5be40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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