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

Issue on pie chart background color

hi

Here green--->Allowed

Red---->not allowed

blue--->Hold

orange---->Allowed shortly

i wrote condition like this--->IF(GetCurrentSelections(stage)>0,color(FieldIndex('stage',stage)),color(FieldIndex('stage',stage)))

my issue is  when i am reloading  the application the colors are changing .like this

green--->not allowed

Red---->Allowed

blue--->Hold

orange---->Allowed shortly

Thanks,

siddiq

11 Replies
swuehl
MVP
MVP

Not sure if I fully understood your conditional to set the color (isn't the THEN and ELSE branch identical?), but if you want to keep consistent colors for your stages, have a look at

Colors in charts

Chanty4u
MVP
MVP

Otherwise.

if u want to maintain the particulars in pie or .. u can set first 1-6 and 6-12 colours by uaa own and apply.

pie.PNG

SunilChauhan
Champion
Champion

write color code in Expression

if(field=Value1,color1

if(field=value2,color2

if(field=value3,color3

if(field=value4,color4

))))

Sunil Chauhan
Kushal_Chawda

Go to pie chart expression, in background color try below condition

=pick (match(Field,'Allowed','Not Allowed','Hold','Allow Shortly'),

red(), green(),blue(),orange())

if any color function is not recognize then use RGB(value1,value2,value3)

Not applicable
Author

i have applied above two expressions but by default one field value taking Black color when i click on the field i am getting pie chart something like  below(completely Black).i need all four colors should be user defined

swuehl
MVP
MVP

Could you please post a small sample QVW that shows that issue or at least all dimensions / expressions / modified chart settings of that pie chart?

Not applicable
Author

sorry ..confidential

swuehl
MVP
MVP

Your dimensions and expressions and chart settings are confidential?

Well, then my answer is confidential, too

Not applicable
Author

sorry...yar  my dimension is State Name and expression count({1}[State])

In background color :

=if(GetCurrentSelections([State])>0,color(FieldIndex(' State',[State])),color(FieldIndex('State',[State])))