Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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!

3 Replies
Ivan_Bozov
Luminary
Luminary

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.

vizmind.eu
vicobi123
Contributor III
Contributor III

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
Author

Very helpful! Thanks, Ivan!