Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Error on pie chart color

Hi,
I have a drill down group which is region and country that region have its own color, i apply this code on background color on expressions

if(GetCurrentField([Region/Country])='Region',RGB(Region_RValue, Region_GValue, Region_BValue))

if i select region, the color work fine for my pie, but when i drill down to country level, the pie turn black color but the legend was show the dafault color. i attach the pic on below.

anyone who has any ideas to solve this error??

9 Replies
deepakk
Partner - Specialist III
Partner - Specialist III

hi,

Select repeat colors from colors tab and check if it solves your problem (Chart Properties) .

Not applicable
Author

Hi Deepak,

The repeat last color option doesn't work. Still black. 😕

Attached is the sample QVW...

kji
Employee
Employee

Your color expression is:

=if(GetCurrentField([Region/Country])='Region',RGB(R_Color, G_Color, B_Color))

which means that you will get black whenever your dimensions is not Region (expression evaluates to null).

Not applicable
Author

But for some reason, it works for bar chart. It will use the colors that I defined in Color tab if I drill down to Country Level (not Region).

Not applicable
Author

but this color expressions look fine for other type of chart except pie and funnel (after select multi-color on color properties) , not sure why the mutli-color option is disable on pie

johnw
Champion III
Champion III

Looks like a bug to me. The legend shows the right colors, but the chart itself fails to go get the default colors when the expression evaluates to null(). It is at a minimum inconsistent, and I think it's fairly clear that the chart SHOULD have the colors indicated in the legend.

Not applicable
Author

Dear Khim,

Kindly share the QV version you using.

There are some bugs in the latest version.

Try creating a sperate application and use the same pie chart.

Do check the expression used.

Not applicable
Author

I'm using QV10 SR1

Not applicable
Author

QV 10 SR 1 is having some bugs.

I had faced same problem, you try on QV 9.5 it will run perfectly.