Tooltip percentage template - no decimal point

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

    Posted 16 Mar Link to this post

    Hello,

    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%

     

    Thanks.

  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2592 posts

    Posted 18 Mar 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:
    http://docs.telerik.com/kendo-ui/framework/globalization/numberformatting

    Regards,
    Iliana Nikolova
    Telerik
    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. UI for ASP.NET MVC is VS 2017 Ready
  4. IHS
    IHS avatar
    2 posts
    Member since:
    Mar 2016

    Posted 18 Mar 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