Tooltip percentage template - no decimal point

3 posts, 0 answers
  1. IHS
    IHS avatar
    2 posts
    Member since:
    Mar 2016

    Posted 16 Mar 2016 Link to this post


    I have a tooltip like so:

    .Tooltip(tt => tt.Visible(true).Template("#= kendo.format('{0:p}', percentage)#")))

    This is great and gives me the percentage of the values in the charts fine...EXCEPT, I would like the percentages to have no decimal points, i.e: 23% instead of 22.80% for example. 

    Is there any way Telerik can do that for me?

    IF NOT:
    Can I at least get 22.8%



  2. Iliana Nikolova
    Iliana Nikolova avatar
    2622 posts

    Posted 18 Mar 2016 Link to this post

    Hi Hakki,

    In order to achieve this you could use p0
    .Tooltip(tt => tt.Visible(true).Template("#= kendo.format('{0:p0}', percentage)#")))
    For more details about the formats in Kendo UI check the corresponding documentation:

    Iliana Nikolova
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. IHS
    IHS avatar
    2 posts
    Member since:
    Mar 2016

    Posted 18 Mar 2016 in reply to Iliana Nikolova Link to this post

    Ah, excellent. Thank you kindly Iliana. I'm sure I'll get use to using the documentation better in the future :)
Back to Top