Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Manipulate the color of the pie's of a piechart

Gents,

I used this piece of coding in a chart to alter the background colour (on expression) of a pie but all turns into black.

if(GetCurrentField(#TEST) = 'R', rgb(0,128,0),
      if(GetCurrentField(#TEST) = 'A', rgb(255,255,0));

has onyone an idea how to get the right colours?

BR

M.

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Try this.

    

if(#TEST = 'R', rgb(0,128,0),
      if(#TEST = 'A', rgb(255,255,0));

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

3 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Try this.

    

if(#TEST = 'R', rgb(0,128,0),
      if(#TEST = 'A', rgb(255,255,0));

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
sushil353
Master II
Master II

is #Test is your field name? and 'R' , 'A' are the values of the field #TEST...?

Try this

if(GetFieldSelections(#TEST) = 'R', rgb(0,128,0),

      if(GetFieldSelections(#TEST) = 'A', rgb(255,255,0));

HTH

Sushil

Not applicable
Author

Thx Gents!!

All working now...