Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
microwin88x
Creator III
Creator III

Consistent Colors in Charts

Hello!

I have an app with many charts where they use dimensions such as: Zone, Neighbourhood, Category, Subcategory, User, etc.

The thing is that I need to use the same color in every chart (for example, Zone 1 should always have color blue).

I've solved that (in the Chart having one Dimension Zone) using the following:

LOAD * INLINE [
    R, G, B, ZONE
    101,100,121, Valley
    210,220,200, Norte
    30,230,200, Olivos
    40,40,100, Pilar]
;

Then, in the Chart Properties > Expression, I used the following: RGB (R,G,B) and it worked.

Now I have a chart with 2 Dimensions in another chart, Zone and Category.

LOAD * INLINE [
X, Y, Z, CATEGORY
    50,100,121, Asesoramiento
    70,230,200, Del Suministro

    (more categories...)];

Is there any way to use RGB (R,G,B) and RGB (X,Y,Z) in the same expression?

Or should I use only the Category RGB function? Because you see Categories by Zone.

Thanks!!!

7 Replies
hic
Former Employee
Former Employee

You cannot use more than one color definition. so I would use the Category function. See also (if you haven't done so already) http://community.qlik.com/blogs/qlikviewdesignblog/2012/12/04/colors-in-charts

HIC

microwin88x
Creator III
Creator III
Author

Thanks Henric!

And what if I have a Cyclic Group with many dimensions inside that group?

How do I define colors for that group of dimensions?

hic
Former Employee
Former Employee

The idea with having a specific color scheme is that the user should recognize a specific category (Product, Region, etc.) by its color, so that color conveys information. It does not work if you do this for many different dimensions. For most dimensions you should use a more neutral color scheme, see e.g. http://www.perceptualedge.com/articles/visual_business_intelligence/rules_for_using_color.pdf.

So, the way I see it, you should assign colors for only one, perhaps two, dimensions in a Cyclic group. And use color functions in exactly the same way as described in http://community.qlik.com/blogs/qlikviewdesignblog/2012/12/04/colors-in-charts. If the color expression is evaluated to NULL (if there are several values), QlikView will use the standard color definitions.

HIC

microwin88x
Creator III
Creator III
Author

Alright! Seems pretty reasonable for me. Thanks for the advice.

Anonymous
Not applicable

By using IF() condition , you can put different colors which will automatically select as per true and false condition

if(conditon,RGB (R,G,B), RGB (X,Y,Z))

hic
Former Employee
Former Employee

You can in principle use an If()-function, but it is not easy to manage. So I would not recommend it.

HIC

Anonymous
Not applicable

All you have to do is to use this function in expression,,, in background color dats it....its working fine...exp.PNG.png