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: 
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
Partner - Champion III
Partner - Champion III

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