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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
danialier
Creator III
Creator III

How to fix Colors in a Combo Chart


Hello,

Do you know how I can fix the colors in a Combo Chart where I have multiple lines and bars ? What happens is that when I select a country or another one in a List Box, the colors of all lines and bars from the Combo Chart get changed...

Thanks,

dani

1 Solution

Accepted Solutions
Nicole-Smith

Also, here is a working example (attached).

View solution in original post

9 Replies
Nicole-Smith

On the colors tab, check the box for "Persistent Colors".

danialier
Creator III
Creator III
Author

Hi Nicole,

Thanks. And how I can assign an specific color to any specific country. I mean I want each country to be colored in an specific color (i.e. Germany in blue, China in red, US in green,...)

danialier
Creator III
Creator III
Author

· Hi Nicole,

Thanks. And how I can assign an specific color to any specific country. I mean I want each country to be colored in an specific color (i.e. Germany in blue, China in red, US in green,...)

Thanks,

dani

Nicole-Smith

On your expression, click the + sign next to it, then for Background Color, you can put an expression like:

pick(match(YourCountryField, 'Germany', 'China', 'US'), rgb(0,0,255), rgb(255,0,0), rgb(0,255,0))

Clever_Anjos
Employee
Employee

I sugest you having an inline table to configure each color to each country and then using your "Color" field as a background color expression

LOAD F1 as Country,

RGB(subfield(F2,',',1),subfield(F2,',',2),subfield(F2,',',3)) as Color

  INLINE [

    F1, F2

    China, "255,0,0"

    Brazil, "0,255,255"

];

danialier
Creator III
Creator III
Author

Thanks Nicole !

I tried on that what when applying the updates my Combo Chart is showing as message as follows: “Allocated memory exceeded” and chart disappears automatically…. What does it mean ???

Thanks !

dani

Nicole-Smith

It most likely means there is something wrong with your expression.  Can you please copy what you have onto here so I can see it?  Or even better yet, post a .qvw file.

Nicole-Smith

Also, here is a working example (attached).

danialier
Creator III
Creator III
Author

Excellent Nicole !!! it works now. many thanks for your support.

Best regards,

dani