Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Uploads getting stuck in the virus scanner. We are investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

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
Highlighted
Partner
Partner

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

Highlighted
Partner
Partner

Did this resolve ur problem? rglenn0780

Highlighted
Creator II
Creator II

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

Highlighted
Master
Master

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

Highlighted
Contributor II
Contributor II

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?

Highlighted
Creator II
Creator II

Hi Mark,

Good question Kathryn.

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

Highlighted
Creator II
Creator II

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

Highlighted
Partner
Partner

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

Highlighted
Contributor III
Contributor III

*Bump*

Very elegant solution compared to custom expression!