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

Tooltip percentage template - no decimal point

2 Answers 590 Views
Chart
This is a migrated thread and some comments may be shown as answers.
IHS
Top achievements
Rank 1
IHS asked on 16 Mar 2016, 11:44 AM

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 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 18 Mar 2016, 08:23 AM
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
0
IHS
Top achievements
Rank 1
answered on 18 Mar 2016, 10:38 AM
Ah, excellent. Thank you kindly Iliana. I'm sure I'll get use to using the documentation better in the future :)
Tags
Chart
Asked by
IHS
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
IHS
Top achievements
Rank 1
Share this question
or