# value is like \$5,000,000,000.00 i want to show this value as 5 billion or \$6,000,000,000.00 as 6 billion like this can any one help me....

1. ##### Srikanth
14 posts
Member since:
Mar 2012

Posted 22 Jul 2015 Link to this post

value is like \$5,000,000,000.00 i want to show this value as 5 billion or \$6,000,000,000.00 as 6 billion like this can any one help me....

like 1k,100k,200k............

2. ##### Danail Vasilev
1502 posts

Posted 27 Jul 2015 Link to this post

Hello,

You can use templates in the gauge labels, the similar way like with the chart's labels - http://www.telerik.com/forums/showing-value-%28in-thousands%29. For example:

ASPX:
<script>
function FormatLongNumber(value) {

if (value === 0) {
return 0;
}

// hundreds
if (value <= 999) {
return value;
}

// thousands
if (value >= 1000 && value <= 999999) {
return (value / 1000) + 'K';
}

// millions
if (value >= 1000000 && value <= 999999999) {
return (value / 1000000) + 'M';
}

// billions
if (value >= 1000000000 && value <= 999999999999) {
return (value / 1000000000) + 'B';
}

return value;
}
</script>
<Pointer Value="1000000000" Color="Black">
<Cap Color="Gray" Size="0.1" />
</Pointer>
<Scale Min="0" Max="4000000">
<Labels Position="Outside" Template="#=FormatLongNumber(value)#" />
<Ranges>
<telerik:GaugeRange Color="Orange" From="1000000" To="2000000" />
<telerik:GaugeRange Color="Green" From="2000000" To="3000000" />
<telerik:GaugeRange Color="Red" From="3000000" To="4000000" />
</Ranges>
</Scale>