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

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.

9 Replies
OmarBenSalem

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

Did this resolve ur problem? rglenn0780

Anonymous
Not applicable
Author

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

rittermd
Master
Master

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

Anonymous
Not applicable
Author

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?

Anonymous
Not applicable
Author

Hi Mark,

Good question Kathryn.

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

Anonymous
Not applicable
Author

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

OmarBenSalem

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

klikgevoel
Contributor III
Contributor III

*Bump*

Very elegant solution compared to custom expression!