Pie chart - order by, colors


When using pie charts it is very difficult or even impossible to create comparable charts. Ordering and coloring is all automatic and seems to always represent categories by descending order.

Imagine only 2 categories of data - CatA and CatB. You do 2 graphs showing the percentages these 2 categories show for 2 diferente series.

Since you cannot control de order of drawing you may get CatA first or second in each graph. Worse even, with different colors. It is very difficult to read into those charts.

funny enough in this example colors are the same…

So my question is: is there a way to sort a pie chart? and is there a way to define colors for each “X” category?



So, just to simplify matters. Colors are given from a pallete and seems to respect order of records in table: 1st record=1st corlor, 2nd record=2nd color, etc.

Problem here is when we want that CatA to have the same color in all graphics to be easily identifiable. So in graphs where it is not the first record it will be given a arbitrary color by the system… sometimes it’s blue sometimes it’s red…

The drawing order though is always by ascending numeric order. Even if you turn on/off x option of sorting. Naturally this is not desirable in many situations.


I agree that ideally in both charts “CatA”/“CatB” will get the same color. We can start with giving the user the ability to change colors for the pie charts (you’re welcome to open a GitHub issue for this).

Currently the coloring is based on FIFO. It seems to make sense to change it to give the same color for the same series name every time. I just wonder if there are issues with this that I don’t see.


Hi Arik.

The color selection can be optional so there won’t be any permanent damage.

I can create the github issue (https://github.com/getredash/redash/issues/1354)

What do you think about a ticket also about the sort order? It seems to me we cannot order by X even when selecting that option in the X axis options…