Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Not applicable

How to change the color within segments of pie chart

Hello,

I have pie charts on two different sheets with fields pass, fail, defect. I would like the colors to match up for both. Right now, they are different. I would like pass to be blue, fail to be red and defect to be yellow. Any way to customize the colors within the field/legend so they match?

Thanks!

Tags (2)
3 Replies
Ivan_Bozov
Valued Contributor

Re: How to change the color within segments of pie chart

Hello! You can use the option color by expression.

Capture.PNG

Let's say your dimension is called status. Then the expression would be:

if(status='pass', blue(), if(status='fail', red(), if(status='defect', yellow())))


Use this for both pie charts.

vicobi123
New Contributor III

Re: How to change the color within segments of pie chart

Hi, Following on from what Ivan said, you can use the IF statement and you can also use the Pick function to do a calculation for the colours

Not applicable

Re: How to change the color within segments of pie chart

Very helpful! Thanks, Ivan!

Community Browser