@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! Go to 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:
Any thoughts on this inquiry?
As far as I know, chart column colors are ordered alphabetically based on the label column. So in your case you should be able to use your label column with โGreenโ followed by โRedโ in your aggregate pie chart, because โcompleteโ is before โnot doneโ alphabetically.
The color column is not used directly in this case (only to compute your label column) and color is determined by that the order specified in the aggregate pie chart view.
If doesnโt work, let me know, Iโm happy to follow-up on this.
@nico, apologies for the late response, I didnโt see your post come through. My understanding is the same as yours - alphabetical order. However, that is not the behavior Iโm seeing in my app - at least not at the start of the day. At the start of the day, our daily tasks havenโt been done yet, so I would expect to see a pie chart that is all red in color and labeled โnot doneโ. Instead, I see a pie chart that is all green in color and labeled โnot doneโ.
As tasks are completed and both โcompleteโ, and โnot doneโ appear on the graph then the colors and labels match up.
Any thoughts? again, apologies for the very late reply.
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:
@nico thanks! Enum column type works a treat. Why does this work and text columns doesnโt?
The reason is with that a enum has the complete list of statuses whereas the text type it guesses by looking at the data in the spreadsheet. When they are all the same it will assume there is just one status when there are in fact two but one of them (โcompleteโ) has 0 entries.
At any rate, Iโm glad this worked for you!
User | Count |
---|---|
15 | |
12 | |
9 | |
8 | |
4 |