Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Color Coding of Bar charts on the basis of dimension

Hi,

I have a products category with 3 levels of hierarchy.

L1          L2          L3

A           A1          A2

B           B1          B2

C           C1          C2

Now when i use the above levels as dimension :-

Bar for 'A' should show 'blue' color.

Bar for 'B' should show 'red' color.

Bar for 'C' should show 'green' color.

 

Now When I drill down in 'A'......bars for 'A1' & 'A2' & 'A3' should show shades of blue color.

similarly for 'B'....bars for 'B1' & 'B2' & 'B3' should show shades of red color.

similarly for 'C'......

How do i do it ?

Please help

7 Replies
sujeetsingh
Master III
Master III

u can use color functions as red(),green() and all.

Not applicable
Author

Please send me a sample code for 3 levels for 1 product.

Thanks in advance.

hic
Former Employee
Former Employee

This problem is described in one of my blog posts:

http://community.qlik.com/blogs/qlikviewdesignblog/2012/12/04/colors-in-charts

HIC

Not applicable
Author

Hi,

Step1 - Make a Drill - Down Group of your dimension

Step2 - Create Bar chart using the group dimension created above

Step3 - In the COLOR tab of the chart select the options "MultiColored" and "Persitent Color"

You can select the color at the left hand side

Thanks,

sujeetsingh
Master III
Master III

Here is the file a sample in my previous post

Not applicable
Author

Hi Henric,

I am going through your post.....till then please tell me that will it work for stack chart ?

hic
Former Employee
Former Employee

Yes, it will. I used the attached script (test data + color definitions) and =HSL(Hue,Sat,Lum+lum) as bkgrnd color Bar chart.pngfunction.

HIC