Pie chart colors applied to [COLOR] and switch expression result

@tony @morgan @Aleksi I’m having trouble with pie chart colors similar to the following post: [Pie chart colors! Is there a way to tie spec]

However, rather than using an ENUM column, I’m using a COLOR column with a single option “Green” that renders as a checkbox in a form. An IF expression changes the color of a STATUS column (box checked = GREEN, box unchecked=RED) and a switch expression is used to create more meaningful labels for the chart legend - SWITCH([DAILY], “Green”, “complete”, “Red”, “not done”, “”).

I would like for the “Green” (or “complete”, after the switch expression) to be rendered in the green color in the pie chart and “Red” (or “not done”) to be red in the pie chart. However, as in the referenced post, the pie chart colors seem to be applied in descending order as configured in the UX/Chart/View Options/Chart Colors rather than applied strictly by category.

Any suggestions? Thanks in advance!

Solved Solved
0 6 2,329
1 ACCEPTED SOLUTION

It will display in alphabetical order but when there is no data for a category it will skip that one, so for example if all of your statuses are “Not Done” it will incorrectly use the first color instead of the second. There is no way to set the color dynamically like you want (but that seems like a reasonable feature request).

To workaround this, I recommend you change your label type to an enum and be sure to add the two options: “Complete”, “Not Done” then the color order should always match even when one of the categories is empty.

Like this:

View solution in original post

6 REPLIES 6
Top Labels in this Space