How to set tooltip value for each step?

3 posts, 0 answers
  1. Tayger
    Tayger avatar
    93 posts
    Member since:
    Jan 2015

    Posted 11 Dec 2016 Link to this post

    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. Stefan
    Admin
    Stefan avatar
    665 posts

    Posted 13 Dec 2016 Link to this post

    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 visualization (charts) and form elements.
  3. Tayger
    Tayger avatar
    93 posts
    Member since:
    Jan 2015

    Posted 13 Dec 2016 in reply to Stefan Link to this post

    Excellent, thank you and way easier than I thought!
Back to Top