Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
starter888
Contributor
Contributor

Specifying a colour for each bar in a chart

Hi everyone

I am trying to colour each of the bars a specific RGB colour.

Can someone help with an expression I can use to specify the colours? Each bar is a result of a % of count e.g. # of dogs, # of cats, # of rabbits

Each animal/category needs to be a specific colour which I have the RGB for.

 

Thanks in advance 🙂

Screen Shot 2019-02-12 at 6.04.21 pm.png

Labels (3)
1 Solution

Accepted Solutions
arulsettu
Master III
Master III

Check the attachment and change the colour as per your need

 

View solution in original post

10 Replies
arulsettu
Master III
Master III

Hi 

Under Appearance -> colour and legend 

 

Choose Dimension

and write a calculated expression like

if(dimension='Cat',red(),

if(dimension='Dog',blue(),

if(dimension='rabbits',green(),

if(dimension='Bull',Brown()))))

 

 

starter888
Contributor
Contributor
Author

Thanks for replying.

It's saying:

Screen Shot 2019-02-12 at 6.53.08 pm.png

arulsettu
Master III
Master III

it just a sample code

you need to change the dimension 

can you post your app. 

starter888
Contributor
Contributor
Author

I don't know how to post my app

Channa
Specialist III
Specialist III

you have to close IF 

If(dim='Cat',red())

Channa
arulsettu
Master III
Master III

Click reply and left corner there is option to choose your qvf file.

starter888
Contributor
Contributor
Author

 
starter888
Contributor
Contributor
Author

Had to zip as wasn't accepting qvf - hope it works

arulsettu
Master III
Master III

Check the attachment and change the colour as per your need