Skip to content

Make it easier to change animation button label #1205

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

Closed
cpsievert opened this issue Feb 24, 2018 · 0 comments
Closed

Make it easier to change animation button label #1205

cpsievert opened this issue Feb 24, 2018 · 0 comments

Comments

@cpsievert
Copy link
Collaborator

cpsievert commented Feb 24, 2018

This is currently quite difficult and actually best done via plotly_build() since this

plot_ly(mtcars, x = ~mpg, y = ~wt, frame = ~vs) %>% 
  animation_button(buttons = list(list(label = "Custom")))

overwrites the auto-generated buttons object. At least for users of the frame API, it probably only ever makes sense to have write access to button.label anyway, so I'm thinking we should add an explicit label argument to animation_button():

plot_ly(mtcars, x = ~mpg, y = ~wt, frame = ~vs) %>% 
  animation_button(label = "Custom", bgcolor = "red", font = list(color = "white"))

screen shot 2018-02-24 at 10 25 33 am

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