Skip to content

The style() function doesn't support partial updates #1342

Closed
@cpsievert

Description

@cpsievert

The Plotly.restyle() JavaScript method has long supported "partial updates" (i.e. modification of a particular property of an object, rather than the entire object). Here is a mini example:

https://codepen.io/cpsievert/pen/MqLxOM

The style() function in R is meant to mimic Plotly.restyle(), but it doesn't currently support the same "partial update" API.

p <- plot_ly(x = 1:10, y = 1:10, symbol = I(15))
# as expected, produces red circles
style(p, marker = list(color = "red"))
# should produce red squares
style(p, marker.color = "red")

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