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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

gradient color in expression

I am looking for a solution to set an one gradient color in an expression.
I need this because I have to many values and else the color of the first value will be taken again after all the colors are used.

Can someone please help me with this?
I already know how to give it a normal rgb color but it must be an one gradient color.

5 Replies
Not applicable
Author

What type of object and what attribute are you trying to give a gradient?

For example, you can use an expression to define both the primary and secondary colors of a sheet background or caption. You could use a variable and set that based on what color you want for the gradient.

Maybe if you can give me an example of where you are trying to use this, I can give you a specific example.

Not applicable
Author

I try to do this for the color of a bar in a stacked bar chart.

More specific for the background color of the bar. Normally you can choose in the tab colors or a chart a specific color and than select the option one color gradiant. But I want to do this by an expression in the background color of my expression.

Not applicable
Author

It looks like each color has to be defined individually. It doesn't look like it is possible to use one expression to control all of the colors, because the expression would not know what number it is on.

It may be possible to use multiple variables, one for each base color. It may be easier to manually set up each one.

Not applicable
Author

I made an example so it is easier to understand what I mean.
Like you can see I have 20 expressions.

And I need a specific color for each bar. The first 18 bars I can do on the standard way.
But for bar 19 and 20 I need to do it in the expression.
But the limitation I have for the moment in this expression it that all my other bars have the option one gradiant selected and for the last 2 bars this is impossible because I work with expressions.
Can someone tell me how to define the same option in an expression?

http://community.qlik.com/members/elke.corstjens/files/EXAMPLE.qvw.aspx


Not applicable
Author

Hi; Have you ever received reply to this question? I'm looking for the same thing.

In the "background color" properties of a chart I can enter a RGB code RGB(100,0,0).

But I'm looking to find out how to make that a gradiant color. (Make it flow from red to gray or something)

Any clue anyone?