Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to Change Bubble Chart Color?

Hi, I have a bubble chart, and am trying to change color of the bubble by a formula. I opened the Background Color of the Expression, entered the definition of : =if(Savings>2000, Green(), Red()) . If this was working, I would see a lot of green, the rest blue. Instead the bubbles stay red.. What am I missing? Thank you in advance.

1 Solution

Accepted Solutions
maxgro
MVP
MVP

try the background color on the first one

View solution in original post

12 Replies
maxgro
MVP
MVP

maybe you need a

sum(Savings)? or some other aggregation function

Not applicable
Author

I tried that, didn't work. I even used a static color expression of Green(), still stays red. I'm guessing there is a

checkbox somewhere that needs to be unchecked? I looked and didn't see anything. Thank you.

maxgro
MVP
MVP

is it the first expression?

value of saving?

ian_wilson
Former Employee
Former Employee

Recently I wanted to have the bubble color change with the bubble size.  Here's what I did...

Given:

Scatter plot Dimension: [Employee Name].

Scatter plot Measures: [Sales], [Years Employed], and [Quota] (all of these are being Summed).

In the color by expression field, my formula is:

Colormix1((Sum([Quota])-$(=min(aggr(Sum([Quota]),[Employee Name]))))/$(=(max(aggr(Sum([Quota]),[Employee Name]))-min(aggr(Sum([Quota]),[Employee Name]))))

        ,rgb(254,227,145)

        ,rgb(102,37,6))

The gist of the Colormix1() function is that you need to give it a value, then a start color, and an end color.  Note: there is also a Colormix2() function which gives you the ability to set a midpoint color.

Hope this helps.  See the first sheet of the attached qvf file.

Not applicable
Author

Thanks Ian. I'll have to look into the Colormix function, seems very advanced I'm not sure how to open your file?

Not applicable
Author

No, it's the 3rd. See screen:screen.png

maxgro
MVP
MVP

try the background color on the first one

Anonymous
Not applicable
Author

You posted the question under Qlik Sense, but apparently you use QlikView, hence the confusion.

Can you try color on the dimension side rather than expression?

Anonymous
Not applicable
Author

No, not the dimension.  It is first expression, background color, as massimo.grassi‌ said.