This is a migrated thread and some comments may be shown as answers.

How to set tooltip value for each step?

2 Answers 463 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Tayger
Top achievements
Rank 1
Iron
Tayger asked on 12 Dec 2016, 12:03 AM

Hello 

Initially the "internal" tooltip of KendoUI slider shows the value of the current position. I need to set a tooltip text for each position. Example of a slider with 3 values (1, 2, 3). Tooltip for each position:
1 - Ok
2 - Nice
3 - Great

By the documentation I can't figure how to set it directly (inital) or at runtime (trying to access/set tooltip text of slider in change/slide events but can't figure how to access the sliders tooltip).

Is there a way to set a tooltip-text for each slider-position?

Regards

2 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 13 Dec 2016, 03:19 PM
Hello Farai,

The desired result can be achieved using the tooltip.template property of the Slider. Then depending on the slider value display the desired text:

http://docs.telerik.com/kendo-ui/api/javascript/ui/slider#configuration-tooltip.template

http://docs.telerik.com/kendo-ui/framework/templates/overview#create-external-templates

I made a Dojo example demonstrating the described implementation:

http://dojo.telerik.com/OkawE

I hope this will help to achieve the desired result.

Regards,
Stefan
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data (charts) and form elements.
0
Tayger
Top achievements
Rank 1
Iron
answered on 13 Dec 2016, 09:13 PM
Excellent, thank you and way easier than I thought!
Tags
Slider
Asked by
Tayger
Top achievements
Rank 1
Iron
Answers by
Stefan
Telerik team
Tayger
Top achievements
Rank 1
Iron
Share this question
or