Skip to content

Setting default colors #2136

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
cixzhang opened this issue Oct 31, 2017 · 11 comments
Closed

Setting default colors #2136

cixzhang opened this issue Oct 31, 2017 · 11 comments
Labels
feature something new

Comments

@cixzhang
Copy link
Contributor

Could we have a way to override the default colors for plotlyjs?

I'm willing to work on this feature.

@etpinard
Copy link
Contributor

Can you be more specific?

You would like to make the default trace-to-trace color sequence customizable?

@cixzhang
Copy link
Contributor Author

@etpinard Yup! Exactly! I'd like to be able to set a specific color scheme for all chart traces to use.

@etpinard
Copy link
Contributor

Ok. I'm thinking this should be a config option e.g. traceColorDefaults.

@cixzhang
Copy link
Contributor Author

That sounds good to me! I'll take a stab at it tonight.

@cixzhang
Copy link
Contributor Author

cixzhang commented Nov 1, 2017

Following the PR guidelines, I made a PR here in my own fork: cixzhang#1.

Please have a look when you have time!

@alexcjohnson
Copy link
Collaborator

@cixzhang Great PR! @etpinard and I had a discussion about this offline though, and we concluded it actually should be a top-level layout attribute, not a config option. The advantage of this is that the result is portable (on plot.ly for example data and layout get saved with the plot but config is context-dependent), and easier to change (via relayout / update) - which can be useful for example if you want to try out a bunch of different themes / templates for your plot (cc @bpostlethwaite )

We're thinking layout.colorway - sound reasonable?

@cixzhang
Copy link
Contributor Author

cixzhang commented Nov 1, 2017

Thanks for the feedback! That makes sense to me. I'll take a look at implementing it as a layout attribute this evening.

@cixzhang
Copy link
Contributor Author

cixzhang commented Nov 2, 2017

I've created a new PR with layout.colorway on my fork here: cixzhang#2

@cixzhang
Copy link
Contributor Author

cixzhang commented Nov 6, 2017

I have updated my PR here: cixzhang#2. Let me know if there's anything else I should do. :)

@bpostlethwaite
Copy link
Member

Thanks @cixzhang we appreciate the PR and will get to it ASAP. Unfortunately that may be a few days as our core plotly.js team is either on vacation or dealing with unforeseen events. Everything should be back to normal next week. Thanks again.

@etpinard
Copy link
Contributor

Done in #2156

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

No branches or pull requests

4 participants