Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Color ranking in a chart

I have been asked by my customers to produce a ranked chart where the background colour goes from green for rank 1 through yellow for the middle rank to red for the last rank. Given that the number of ranks can vary, I have tried to use RGB() to define the colours but it only applies to the first rank.

1 Solution

Accepted Solutions
Not applicable
Author

I have found another solution which does not require the use of the colormix wizard.

By using the HSL function, and defining certain hues:

HSL((GetPossibleCount(Field)-rank(RankingField)+1)/GetPossibleCount(Field)*80/255,240/255,120/255)

View solution in original post

5 Replies
rajeshvaswani77
Specialist III
Specialist III

Go to expression background and there use an if condition to define the RGB values.

thanks,

Rajesh Vaswani

Larry_Aaron
Employee
Employee

In the Expression tab

Expression > Background Color > Definition > File > Colormix Wizard

Not applicable
Author

I have found another solution which does not require the use of the colormix wizard.

By using the HSL function, and defining certain hues:

HSL((GetPossibleCount(Field)-rank(RankingField)+1)/GetPossibleCount(Field)*80/255,240/255,120/255)

View solution in original post

v_iyyappan
Specialist
Specialist

Hi,

     Using Visual Cues We get the color based on ranks. Attached a sample QV file.

May be its helpful for u.

Iyyappan

Not applicable
Author

Hi Russellangus,

I'm trying to do what you described (where multiple background range colours show all the time and not only when selected), but am battling to implement HSL - I'd really appreciate it if you could please elaborate on how you used it?