0

I need to change the background color of certain columns based on a numeric value, and I can't find a way to properly do it. In the uploaded image there's a more detailed example of what I'd need

Any help would be greatly appreciated

Edit: Here's the image, not sure how but it didn't get linked right the first time

https://i.stack.imgur.com/DJHZ7.jpg

marco
  • 1
  • 1

1 Answers1

0

It's not clear from your screenshot what you actually desire, but you can always do conditional coloring in most Qlik charts. I can't speak from experience about AnyChart objects but it appears from their documentation that you can also use conditional coloring with their extensions.

Here's a simple example where the color red, via the Red() color function, is applied where the [WeekDayNumField] is 1:

=if(Num(WeekDayNumField) = 1, red())

Basically, all Mondays will turn red, based on my default Weekday() settings. Here's what that may look like (note that I'm using a Qlik pivot table object):

Screenshot of a Qlik Sense pivot table with basic conditional coloring

You could also pre-define some color values in the Data Load Editor (here, I'm using color hex values):

[Day Colors]:
load * inline [
DayColor    ,   WeekDayNumField
#c3e694     ,   0
#ca8d8a     ,   1
#7d90f6     ,   2
#a97cd9     ,   3
#a97cd9     ,   4
#8fdfe6     ,   5
#8fdfe6     ,   6
];

Then when creating a conditional coloring expression, you could use something like this:

=if(Sum(Expression1) > 20000, DayColor)

That expression allows us to base our coloring off of the result of an aggregation while keeping the resulting colors consistent with the days of the week:

Screenshot of a Qlik Sense pivot table with more basic conditional coloring

SmoothBrane
  • 721
  • 4
  • 5