Skip to content

colorway attribute for pie charts #1617

Closed
@jackparmer

Description

@jackparmer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions