Skip to content

animation_button(visible=FALSE) meddles with trace names #1638

Description

@stvrd

First of all: Congratulations for this magnificient package!
I am using the r package plotly and came across the following bug:

Naming traces works usually very well. When I remove the animation_button (which should be removed by default, imho) the names of traces in the legend disappear.

Here is a reproducible example:

data.frame(year = rep(2011:2020,each=10),
           t = 1:100,
           a = runif(100),
           b = rnorm(100),
           c = rexp(100)) %>% 
  plot_ly(x = ~t,
          frame = ~year) %>% 
  add_lines(y = ~a, name = 'uniform') %>% 
  add_lines(y = ~b, name = 'normal') %>% 
  animation_button(visible=FALSE)

Activity

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