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

Restyling a subset of points changes default color #1113

Closed
cpsievert opened this issue Nov 4, 2016 · 5 comments
Closed

Restyling a subset of points changes default color #1113

cpsievert opened this issue Nov 4, 2016 · 5 comments

Comments

@cpsievert
Copy link

http://codepen.io/cpsievert/pen/YpzBqv

@etpinard
Copy link
Contributor

etpinard commented Nov 4, 2016

That's the expected behavior. See here.

Color array items that are non-numeric and invalid colors string (e.g. undefined in your example) are drawn as #444.

Is the current that surprising?

@cpsievert
Copy link
Author

Ah, I see, it is a bit surprising to me. Something about that syntax made me think you could restyle particular marks without side-effects...

@cpsievert
Copy link
Author

On a related note, I also find this behavior surprising http://codepen.io/cpsievert/pen/dOyryr

@etpinard
Copy link
Contributor

etpinard commented Nov 4, 2016

... and I'm surprised that you forgot about this restyle q-u-i-r-k

Plotly.restyle(gd, {'marker.color': [["red", "blue"]]});

is what you want I believe.

@cpsievert
Copy link
Author

Thanks. The biggest reason for opening this ticket was because I wasn’t sure how to get restyle() to do what I wanted, but this comment fixes that

@etpinard etpinard closed this as completed Nov 7, 2016
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

2 participants