Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

tkendrick20
Valued Contributor

Stacked Bar Chart Legend with Custom Colors

I have a stacked bar chart with custom colors. However, when I am using custom colors the option to also display a legend disappears. Is there any way to have a legend show up even though I am using custom colors?

Stacked Chart.PNG

Stacked Chart with Legend.PNG

11 Replies
ift_isabelle
Contributor II

Re: Stacked Bar Chart Legend with Custom Colors

I have the same problem. Did you found a solution yet?

mhartono
Contributor

Re: Stacked Bar Chart Legend with Custom Colors

As a workaround, perhaps create a text & image object containing the color legends, and put it next to the bar chart.

ift_isabelle
Contributor II

Re: Stacked Bar Chart Legend with Custom Colors

My problem is that I have a Drilldown, so my legend wil change.

Isn't this a bug in the Qlik Sense system?

linoybar
Contributor III

Re: Stacked Bar Chart Legend with Custom Colors

Same problem... any solution for this?

tkendrick20
Valued Contributor

Re: Stacked Bar Chart Legend with Custom Colors

As muliadyhartono‌ said. I just created an image and put it next to the chart. The chart is in a mashup, so it doesn't look too bad.

ift_isabelle
Contributor II

Re: Stacked Bar Chart Legend with Custom Colors

In the september release (or maybe June) they fixed a part of this.

In your measure items you can give your measures a color. That color will be used in the charts and legend. 

So if you make a measure for always and give it a color, it should be in your legend.

linoybar
Contributor III

Re: Stacked Bar Chart Legend with Custom Colors

Yeah, thanks, that's great!

But I need this functionality for dimensions, not measures...

ift_isabelle
Contributor II

Re: Stacked Bar Chart Legend with Custom Colors

In the november release it is possible (not sure about september).

Make a master dimension and go to value colors (1).

Click on the color right of the dimension value and change it to the desired color (2). 

Change color.PNG

After that go the visualisation and (if not already on) select library colors.

Library.PNG

Is this what you want?

linoybar
Contributor III

Re: Stacked Bar Chart Legend with Custom Colors

Yeah, that's the way to do it! Thanks!

The only thing is that I can't find a way to highlight rows in s straight table by this dimension colors.The only way I see there is "Background color expression"/ Is there a way to "pull" the colors from master dim into expression?

Community Browser