Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Fading Colors in bar chart?

fadingcolors.png

How do I create fading colors in a bar chart like the above graphic?

These are the current settings in my color tab:

colortab.png

8 Replies
Gysbert_Wassenaar

If you click on the + in front of an expression (or dimension) you can select Background Color and enter an expression to calculate the background color of the bars (or line or cells depending on chart type). For your example you could use the argb function. It takes for arguments. The first is for the level of transparency, the alpha level. The other three are the red, green and blue values for the color. You can use an expression to calculate the alpha level.

See this document for an example and more information.


talk is cheap, supply exceeds demand
Not applicable
Author

This can be done with Colormix.

You can see how it's done in the Help doc.  There is also a Colormix wizard to walk you through it as well.

Not applicable
Author

I did try the argb function. However Im not sure what the expression syntax is

i.e.  If(firstcolumn = 1, argb(x,x,x,x), etc...

I tried Column(1) apparently that doesnt reference the first column in a bar chart...

Not applicable
Author

Thank you Steve,

I read up on Colormix in the help file. It seems very focused on looking at the column values.
Example from the text:

Value Expression Upper Limit Lower Limit

Sum(Sales) / Sum(total Sales)  Sum(total Sales)  0

Sum(Sales) / Sum(Quota) 2 (=200%) 0

Avg(Age) Max(total Age)  Min(total Age)

I want the colors to change no mater what the values are!

Not applicable
Author

In that case you can do what Gysbert suggested or simply change the colors in the color tab to represent each shade.  attached is a sample.

Not applicable
Author

Steve, I opened the the test.qvw, it appears that my chart is ignoring all colors after the first color. (see screenshot)

All my bars are the first color(blue)... this has to be a checkbox somewhere right?

fadingcolors2013_04_10.png

Not applicable
Author

Yes...there is a checkbox for Multicolored but it appears to be grayed out.

can you send a sample qvw that you are working with?

Not applicable
Author

The problem ended up being that the multicolors arent supported if you have more than one expression on the expressions tab.

In this case I needed a count and a percentage.