Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

berryandcherry6
Contributor II

Applying custom colors for bar graph in qliksense

Hi,

I am trying to apply custom colors for bars in bar graph.

my expression for each bar in graph is below

1.)sum(vegetables)/sum(groceries)

2.)sum(fruits)/sum(groceries)

3.)sum(bananas)/sum(groceries)

How could i apply different custom colors to these bars.Please help me on this.

Tags (1)
12 Replies
sureshqv
Esteemed Contributor III

Re: Applying custom colors for bar graph in qliksense

try

=if(sum(vegetables)/sum(groceries),Red(),Green())

berryandcherry6
Contributor II

Re: Applying custom colors for bar graph in qliksense

Hi

thanks for reply,

Where should i apply this,

in data or Appearenc?

Not applicable

Re: Applying custom colors for bar graph in qliksense

Hi,

apply it in the background color.

arulsettu
Honored Contributor III

Re: Applying custom colors for bar graph in qliksense

can you share the app?

berryandcherry6
Contributor II

Re: Applying custom colors for bar graph in qliksense

Hi,

i have attached snippet of my work

Capture.PNG

here i have expression for different bars, how could i apply color for this each bars.

Not applicable

Re: Applying custom colors for bar graph in qliksense

Hi,

You can go to the chart properties. Follow below steps

1. use Edit Mode

2. Click on Bar Chart

3. on the right panel, click on Appearance > Colors and legend

4. switch on the custom Colors and then select By measure on the dropdown option

custom colors.PNG

sureshqv
Esteemed Contributor III

Re: Applying custom colors for bar graph in qliksense

hi

try belowbg.PNG

berryandcherry6
Contributor II

Re: Applying custom colors for bar graph in qliksense

HI,

here i have 3 bars with different 3 condition(expression) , how could i use my above code in expression.

Please help me on this.

sureshqv
Esteemed Contributor III

Re: Applying custom colors for bar graph in qliksense

can u share qvf?   orelse share ur expresions?