Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Bar chart Dimension color assignment

I want to assign a color to each dimension in the charts so they always appear the same color across charts.

For example:

My dimensions are as follows (WESTERN EUROPEAN,HISPANIC, MIDDLE EASTERN, AFRICAN AMERICAN, MEDITERRANEAN)

                                                  (         BLUE,                         GREEN,       YELLOW,                 GREY,                               PURPLE)

How can this happen. I am running 11.2 - SR10

Any help out there?

4 Replies
stigchel
Partner - Master
Partner - Master

Next to the persistent color option in the colors tab, I would prefer to load rgb values associated to your dimension in the load script. Load three fields e.g. Red, Green, Blue and in the background color of the dimension (click on the plus sign before the dimension) use the expression

=rgb(Red,Green,Blue)

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

There are a few ways of implementing that:

1. In order to ensure consistent placement of colors, use the "Persistent colors" check box in the Colors tab for all related charts. In this case, colors 1-18 will get assigned based on the Load Order of your dimension. Arrange the values in the desired order and assign chart colors accordingly.

2. Use "Background Color" attribute for the first chart expression and assign color there, based on the value of the dimension. You can either use nested IF conditions, or associate the RGB formula with the dimensional value and use it - something along the lines of :

=$(=only(ColorFormula))

where ColorFormula is a field associated with the dimension (region) and contains the RGB definition of the desired color.

cheers,

Oleg Troyansky

www.masterssummit.com - take you QlikView skills to the next level!

stigchel
Partner - Master
Partner - Master

See example attached

ankitaag
Partner - Creator III
Partner - Creator III

Hello Walter,

Click the + nsign of the dimension , double click the Background color and write the expression as the rgb() code or directly the color as Red or green or whatever you want.

Thanks and Regards,

Ankita