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: 
JavierBlanco
Contributor III
Contributor III

Bar graph colors

Hi everybody,

I'd like to change the color schema of a bar graph:

EncuestasNPS.PNG

So "Promotores" appears in Green(), "Neutrales" in yellow (rgb(248, 193, 27) actually), "Detractores" in LightRed() and "% NPS", the line, in Blue(), for instance.

I haven't found a built-in easy way to pick the colors  of my choice (if not possible, why? It seems a pretty obvious feature to me), so I have tried with an if expression, but it turns everything to Green():

if(Sum(NUM_PROMOTORES), Green(), if(Sum(NUM_NEUTRO), rgb(248, 193, 27), if(Sum( NUM_DETRACTORES), LightRed(), Blue())))

Any hint?

Thanks in advance!

Labels (1)
1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

hi 

assuming each block is a measure in your chart 

than you can create them as master items , and assign each measure it's color in the master item menu 

it very easy and simple 

View solution in original post

3 Replies
lironbaram
Partner - Master III
Partner - Master III

hi 

assuming each block is a measure in your chart 

than you can create them as master items , and assign each measure it's color in the master item menu 

it very easy and simple 

JavierBlanco
Contributor III
Contributor III
Author

Thanks, lironbaram, I was expecting to be able to change colors within the graph itself.

lironbaram
Partner - Master III
Partner - Master III

 hi 

if you think of it , using master item will save you time 

because that way you can control the color of the measure for all the chart you use the measure