Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

rglenn0780
Contributor

Qlik Sense - Custom color a stacked bar chart

Hello,

How do you custom color a stacked bar chart? I would like Revenue to be dark blue and Operating Income to be light blue.

I have one dimension:

1. Product Line

I have two measures:

1. Revenue

2. Operating Income

Any advice here would be great.

I have tried a previous fix on this community by adding a second dimension and using valuelist to call out the measures to color-code them, but in this process, we lose the functionality of hovering over the bars and seeing the revenue or operating income on the chart.

Thanks so much.

Tags (1)
8 Replies
OmarBenSalem
Esteemed Contributor

Re: Qlik Sense - Custom color a stacked bar chart

if u have a new version of qlik sense (june, september , november or even 3.2.x I think), u can create ur 2 measures as master measures and assign colors to them and there u have what u're looking for !

Capture.PNG

OmarBenSalem
Esteemed Contributor

Re: Qlik Sense - Custom color a stacked bar chart

Did this resolve ur problem? rglenn0780

rglenn0780
Contributor

Re: Qlik Sense - Custom color a stacked bar chart

working through it today and will assign if it is correct after I try it out. Will keep you posted. Thanks

rittermd
Honored Contributor

Re: Qlik Sense - Custom color a stacked bar chart

There also is a good extension that will do this called 'Bars Plus'

kathrynkvas
New Contributor II

Re: Qlik Sense - Custom color a stacked bar chart

Mark - thank you for the extension 'Bar Plus'.

Question  regarding conditional coloring in measure attribute - If you have a bar graph with two measures and you want to conditionally color them with an if statement, how would you?

I look at the sample Barsplus qvf, however, it only colors based on the measure.

Example below of Barsplus qvf:

Measure: measure 1

Measure Attribute: red()

Example of desired coloring:

Measure: measure 1

Measure Atttribute: if (dimension = "Product 1", red(),

     if(dimension = "Product 2", green()))

Are you able to perform this desired color coding in Barsplus?

rglenn0780
Contributor

Re: Qlik Sense - Custom color a stacked bar chart

Hi Mark,

Good question Kathryn.

Can you color code the bars plus with an If expression??

rglenn0780
Contributor

Re: Qlik Sense - Custom color a stacked bar chart

We are looking at going into the extension mentioned below for this omarbensalem‌ have you used this bars plus?

OmarBenSalem
Esteemed Contributor

Re: Qlik Sense - Custom color a stacked bar chart

you can always use the qlik's bar; and as you can color the master measures; you can color the master dimension.

exp:

create ur master dimension, then open it:

Capture.PNG

and color it as you wish:

Capture.PNG

Use your master dimension as a dmension of ur graph and color it by dimension:

Capture.PNG

Community Browser