Skip to content
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

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

Open
stvrd opened this issue Dec 18, 2019 · 0 comments
Open

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

stvrd opened this issue Dec 18, 2019 · 0 comments

Comments

@stvrd
Copy link

stvrd commented Dec 18, 2019

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)
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