Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Colours of bars in bar chart

Hi,

I have a bar chart which gives me a bar for the target of sales - actual sales in each department to see what the variance is.

If the bar in the chart is less than 0 i want it to be green and if the bar is greater that zero i want it to be red.

Can you tell me how to do this, this is a picture of the chart below.

So i want to make the second bar green as it is below 0.

Thanks

Laura

chart variance.png

1 Solution

Accepted Solutions
er_mohit
Master II
Master II

in expression tab on + icon of bar chart you ll see the backround color then click on it and put expression which you use for variance

in if condition

like

if(variance>0 ,lightred(),lightgreen ())

hope it helps

View solution in original post

3 Replies
Not applicable
Author

Hey Laura,

If you go to the expression tab and collapse the expression you can change the colour of the bars in the background colour item.

Do something like:

if(column(1)<0,green(),red())

Hopes this helps.

gr.

Frank

er_mohit
Master II
Master II

in expression tab on + icon of bar chart you ll see the backround color then click on it and put expression which you use for variance

in if condition

like

if(variance>0 ,lightred(),lightgreen ())

hope it helps

kumarnatarajan
Partner - Specialist
Partner - Specialist

Hi,

See the below screen Short and attached file. You can able to add condition here

Untitled.jpg