Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamically set color for barchart

Hi,

I have a series of barchart with calculated dimension.

I want to set a fixed color for each dimension value, but dimension are calculated at runtime (based on user selection).

I know I can set a formula in the color section, but how I can set this for calculated dimension?

Eg. my calculated dimension can have value of A, B, C, D

I neet to setup the same color for A/B/C/D, in each barchart, with different formula for every chart.

Have you got any idea?

Thanks

4 Replies
settu_periasamy
Master III
Master III

Hi,

If your dimension value is less (may be 4 or 5 like A,B,C,D), you can try with background color in Expression.

Or try to check the 'Persistent Colors' in the Colors tab.

satishkurra
Specialist II
Specialist II

See if the attached qvw helps

Kushal_Chawda

can you share the sample?

Not applicable
Author

I can't share the document unfortunately.

The suggested solution doesn't work because I'm using calculated dimension, which dynamically change based on user selection.

A,B,C,D are not statically written in the Qlik data but it's generated based on conditions in the dimension.

I would like to get the value of the dimension in the expression and use it to create if statement to setup the right color.

I hope I clearl described the scenario...

Thanks