How can I change the colors in the pie charts being used in polls?
It doesnât look like this was ever answered. Iâm looking for this answer, too.
I would also like to adjust colors because the colors are just a gradient and not easy to determine at a glance when there are many choices.
Manually adjusting colors or having them be based on a complementary color pallette or something more distinct for would be beneficial
I think this is not possible, or at least, I wouldnât know about it.
The bar chart could be done via CSS, but the pie chart is rendered as an entire canvas, so canât target any separate HTML.
Your best bet might be to make a feature request, or marketplace topic about this.
Itâs not currently possible, but it is something weâve done in canvas elements before so we can also make it possible here!
This was just merged
So if you update Discourse a little later today, youâll have access to some new variables for both bar and pie charts:
:root {
--poll-pie-color-1: red;
--poll-pie-color-2: yellow;
/* --poll-pie-color-3: hotpink; etc */
--poll-bar-background: lightblue;
--poll-bar-color: blue;
--poll-bar-color--chosen: salmon;
}

