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

Pie Chart - Background Color

Hi,

I am using a expression for conditional background color:

if(CategoryA=CategoryB,RGB(255,255,0),)

This gives one category (if it equals the other category) the color red...

BUT: all the other parts of the pie get black..

I do not care about the colors of the other parts, only this specific part should be red and the others can keep their standard-colours...

What do I have to change?

Thanks

7 Replies
vikasmahajan

put this in place of zero  rgb(153,207,255) default colour.

hope this help you.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Not applicable
Author

Hi Vikas,

thanks for the response, but this doesnt help since it has still the same effect with the only difference, that instead of black ALL the other parts are blue now..

So if the pie chart shows A,B,C and D, A becomes red but B,C and D still have the same color (either black or with your suggestion blue)..

vikasmahajan

Which is your colour backgroud?

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Not applicable
Author

Background is white..

tresesco
MVP
MVP

If order is not an issue, you can try like this:

Sort by expression: If(Catergory='A',1,2)   // this will bring your desired category on top (ascending)

Now in the color tab, change the first color to your desired one.

vikasmahajan

Please apply following rgb colours

=rgb(255,255,255)

Hope this will resolve your problem

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
karolina_
Creator II
Creator II

That's quite old, but I had the same problem in v11SR6.

I wanted to color one metric from cycle group and all other were black in pie chart. In bar chart there is no issue.

I hadled pie chart using radom function (can be of course use differently, below gave me colors i wanted):

=if(GetCurrentField([New Cycle])='Field Name',

if([Field Name]='X',yellow(),

if([Field Name]='Z',green(),

if([Field Name]='Y',red(),blue()))),

rgb(round(RAND()*RAND()*150,3),round(RAND()*RAND()*170,3),round(RAND()*RAND()*80,3)))