Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Change bar color in histogram dynamically

Hi All,


Can someone help me to change the color of a particular bar in a chart, according to the user color selection.

I save user selection in some variables, but when I try to set the stored RGB value, it doesn't work.

The table has this structure:

Type, Type_var, Value

type1, v_type1, 6

...

typeN, v_typeN, k


In attach you can find an example of the situation.


Capture.PNG



Thanks!

Alex


1 Reply
Gysbert_Wassenaar

Try this expression for the Background color of the chart expression:

pick(match([Type_var],$(=Concat(chr(39) & Type_var & chr(39) ,',', Type))),

$(=concat( '$'& '(' & [Type_var] & ')' ,',', Type))

)


talk is cheap, supply exceeds demand