Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
qvqfqlik
Creator
Creator

help stacked bar chart

I am trying to achieve as below in a stacked bar chart. I have three dimensions..I need three different colors

no.of working days, -> (0-3 days green, 4-6 yellow, 7-9 mustard, 10+ red)

dev risk -> higlighted in brown

print risk-> highlighted in blue

barc.png

9 Replies
TKendrick20
Partner - Specialist
Partner - Specialist

I think you need to change how your data is visualized. Rather than Net Working Days on the x-axis, I think you should have either Risk Print / Risk Development, or the four categories of day ranges. Then you can color the data accordingly.

When editing the chart go to Appearance => Colors and Legend. Then, turn custom colors on and select "By Expression." The expression should then just be a simple IF statement.

kkkumar82
Specialist III
Specialist III

Is this in QlikSense or QlikView, Could you share some sample data

kkkumar82
Specialist III
Specialist III

As Tim said we can create Master item Measures and define the colors there and use them in your charts

rittermd
Master
Master

If you need specific colors in the stacked bar chart I would recommend using the extension BarsPlus.

Otherwise you are stuck with the default colors or you have do a lot of playing with the code.

qvqfqlik
Creator
Creator
Author

I used Barplus, but I am unable to give user defined colors.

qvqfqlik
Creator
Creator
Author

How to achieve this

qvqfqlik
Creator
Creator
Author

the four categories is nothing but the net days and the coloring is based on no.of completion days

eg: if its completed in 0-3 networking days- then green

4-6 yellow

7-9 mustard

10+ is red

on top of this the requirement is to indicate devrisk, print risk which are two different dimensions.

also, in qliksense, when I use color by expression, I am unable to show legend

qvqfqlik
Creator
Creator
Author

qliksense

TKendrick20
Partner - Specialist
Partner - Specialist

Here is how I think you should show this data. It may require that you rework how your data is loaded in.Stacked Chart Doc.PNG

This means that Dev Risk / Print Risk need to be in the same dimension. The buckets for number of completion days will have to be in a second dimension. Yes, you will not be able to show a legend. What I do is create an image which shows what the different colors mean and put it next to the chart on the sheet.