Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Colors in bar chart

Hi,

I want to have two colors on the bars in a chart. The bars are calculated through a if statement:

if ( something * something = something, true, false )

in the case above I have a date dimension, so for all true I want the bar to be green and for all false I want the bar to be red. Is this possible and how should I write the script?

Thanks!

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

Hi,

this can be done in following way:

in Expressions tab of the bar chart properties expand expression item and you will find there its 'Background color' attribute. In definition for that attribute add if(<your_date_condition>, RGB( 50,  140, 3), RGB( 250,  4, 3))

regards

View solution in original post

1 Reply
Not applicable
Author

Hi,

this can be done in following way:

in Expressions tab of the bar chart properties expand expression item and you will find there its 'Background color' attribute. In definition for that attribute add if(<your_date_condition>, RGB( 50,  140, 3), RGB( 250,  4, 3))

regards