Skip to content

Make it easier to change animation button label #1205

Description

@cpsievert

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

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