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:
Regards,
Danail Vasilev
Telerik
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
>
<
telerik:RadRadialGauge
runat
=
"server"
ID
=
"RadRadialGauge1"
Height
=
"350px"
Width
=
"350px"
>
<
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
>
</
telerik:RadRadialGauge
>
Regards,
Danail Vasilev
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