Skip to content

colorway attribute for pie charts #1617

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
jackparmer opened this issue Apr 21, 2017 · 1 comment
Closed

colorway attribute for pie charts #1617

jackparmer opened this issue Apr 21, 2017 · 1 comment
Labels
feature something new

Comments

@jackparmer
Copy link
Contributor

Add a colorway attribute as an optional simplification to slice coloring in pie charts.

Premise from @alexcjohnson :

This is a bit of a strange case, owing to the fact that you need distinct colors for pie charts to make any sense, but most of the time this carries no meaning beyond disambiguation. However sometimes it does, like if you manage to pick colors that carry some real association with the category they label.

Actually though, the way we do it now with hard-coded lists of colors is limiting anyway; as soon as you get more items than are in that list (6, as it stands) it reverts back to our default colors, which kills the aesthetic of whatever scheme you chose. A better solution would be to provide a different attribute, call it something like colorway, that would either be a string from a list of presets, or an array of colors like we do now (but NOT treated as data), which would not be tied to specific data points as they are when you use colors, rather they would be iterated as needed after sorting pie slices, and looped when we run out rather than falling back on the defaults. Currently we have 10 colors in the default set, and we go through all of these, then we go through them all again lightened, then once more darkened, before we go back to the beginning of the list.

@alexcjohnson
Copy link
Collaborator

@jackparmer we have layout.colorway now #2156 - not separate colorways for each pie, but I think this is clearer anyway 99% of the time. Feel free to reopen if you think this isn't sufficient.

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

3 participants