Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
padmanabhan_ram
Creator II
Creator II

Slider

I have to show a slider from 1 to 10. The color in the slider should show me like 1 to 3 in red, 4 to 6 in light green, 7 to 10 Green.

How can do that. Please suggest some information.

Thanks

Padmanabhan

9 Replies
its_anandrjs

Hi,

In slider properties -> Presentation -> Sliderbackground ->

put code like'

if(SliderVal >= 1 and SliderVal <=3,Red(),

if(SliderVal >= 4 and SliderVal <=6,LightGreen(),

if(SliderVal >= 7 and SliderVal <=10,Green())))

Hope this helps

padmanabhan_ram
Creator II
Creator II
Author

Sorry, It's not working

its_anandrjs

Can you share a sample snap shot where you want to change the color.

Thanks & Regards

jsingh71
Partner - Specialist
Partner - Specialist

Hi,

Find Attachment.

its_anandrjs

Hi,

Load in line table like

SliderValue:

load * Inline

[

SliderVal

1

2

3

4

5

6

7

8

9

10

];

and in slider properties -> Presentation -> (Slider Background) or (Scale Background) in this buttons go to option base color -> Calculated and paste this code there

if(SliderVal >= 1 and SliderVal <=3,Red(),  if(SliderVal >= 4 and SliderVal <=6,LightGreen(),  if(SliderVal >= 7 and SliderVal <=10,Green())))   

Hope this helps

Thanks & Regards

lironbaram
Partner - Master III
Partner - Master III

hi

attach is an example

you cant really change the background to three colors

so i used a slider and 3 different lines

but it seems to me the it does the work

ThornOfCrowns
Specialist II
Specialist II

Great tip, thanks very much!

ThornOfCrowns
Specialist II
Specialist II

See Anand Chauhan's answer to see how this can be done.

its_anandrjs

You are welcome

Hope this helps

Thanks & Regards