Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

BAR CHART PLOT AREA COLOUR BASED ON EXPRESSION

Hi, does anyone know if its possible to change the plot area background colour based on an expression?

Basically i want the expression to do the following -

IF Y-AXIS > 0 THEN LIGHTGREEN PLOT AREA COLOUR

IF Y-AXIS < 0 THEN LIGHTRED PLOT AREA COLOUR

I was thinking of the following calulated expression:

=IF( YAXIS >0, LIGHTGREEN(), LIGHTRED())

also see my screenshots below

--------

error loading image

error loading image

17 Replies
Anonymous
Not applicable
Author

Hi Try this:

In the expression + button is there clik on it

Clik on background color & write the condition for colors in Definition........

Pic.png

TKendrick20
Partner - Specialist
Partner - Specialist

That only changes the color of the bars. I'm looking for something like this: Capture.PNG

Anonymous
Not applicable
Author

In colors tab

Chang the colors in Frame Background colors.........

pic1.png

Not applicable
Author

Hi Venkata, I tried this with the Movies Database.qvw and couldn't make it work using your method. Formula of...

If(Sum(FilmCount)>10, green(),red())

attached is qvw...

Anonymous
Not applicable
Author

You have Transparency 100%.  Reduce it, and you'll see green.  Or red, if you select few movies.

Not applicable
Author

Changed transparency

Unfortunately this isn't the same as the examples in this thread. It highlights background when a selection is made but we are looking for the background of the chart to be set based on the value of the expression ie if there is more than 10 movies irrespective of user selection then the background should be green else red.

Anonymous
Not applicable
Author

You can do it with bar color but not with chart background.  Background is one per chart - see my response above, on Nov 6, 2013.

Not applicable
Author

Hi All,

We can change the background color of bar chart, by giving condition.

Go to color tab -> Background -> Calculated -> give the condition.

It's working for me.

Regards,

Pavan.