Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

manojkumargowda
New Contributor III

Custom colours in stacked bar chart in Qliksense

Hi All,

I have strange a requirement to colour stacked bar chart. I have to colour dimension values (col A in red, col B in blue and col C in Green) and rest of the dimension values (col D to H ) should be coloured with default colours. Is this possible?

6 Replies
kkkumar82
Valued Contributor III

Re: Custom colours in stacked bar chart in Qliksense

I think not possible

simran04
New Contributor II

Re: Custom colours in stacked bar chart in Qliksense

Hi Manoj,

I am afraid that's not possible.

DavidŠtorek
Contributor III

Re: Custom colours in stacked bar chart in Qliksense

Hi,

what you want to do is possible. It is just a little bit complicated. You wil have to set colors for all columns (it is not possible to set only three and let the rest "default")

Do you use only one measure (like sum(sales)) and it is split by dimension (col A)?

If so, than go to Apperance->colors and Legend, set colors to custom and select by expression.

Than set it like this

If(<your dimension>='col A',RGB(170,255,106),

If(<your dimension>='col B',RGB(85,232,216),

    If(<your dimension>='col C',RGB(232,192,85),

        If(<your dimension>='col D',RGB(124,116,255),

            If(<your dimension>='col E',RGB(255,123,99),

                If(<your dimension>='col F',RGB(153,129,96),

                    If(<your dimension>='col G',RGB(204,127,27),

                        If(<your dimension>='col H',RGB(27,204,72)))))))))

Of course use your own RGB value (or if you like it you can use this ) You should get something like this

Capture.PNG

You can refer https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/Colors/color-by-expression.htm

balabhaskarqlik
Honored Contributor

Re: Custom colours in stacked bar chart in Qliksense

In Stacked Bar chart - Add Dimensions, measures.

Appearance - Colors & Legend - By dimension.

For Expression wise color apply:

Use below expression, tweak your main expression.

pick(match(Dimension,'K1','E1','B1','B2','B3','Bx'),lightred(),lightblue(),LightGreen(),LightGray(),LightMagenta(),yellow())

balabhaskarqlik
Honored Contributor

Re: Custom colours in stacked bar chart in Qliksense

manojkumargowda
New Contributor III

Re: Custom colours in stacked bar chart in Qliksense

Thanks guys for your suggestions. I got to know this is not possible.

Community Browser