3 Answers, 1 is accepted
0
Hi Anj,
You can use the Format property of label properties element to show float values in labels.
The sample code is below.
For more information please take a look to the Format topic of our online documentation:
http://www.telerik.com/help/silverlight/radgauge-features-labels-format.html
Best wishes,
Andrey Murzov
the Telerik team
You can use the Format property of label properties element to show float values in labels.
The sample code is below.
<
telerik:RadGauge
Width
=
"300"
Height
=
"300"
>
<
telerik:RadialGauge
>
<
telerik:RadialScale
x:Name
=
"radialScale"
Min
=
"0"
Max
=
"1.2"
MajorTickStep
=
"0.1"
>
<
telerik:RadialScale.Label
>
<
telerik:LabelProperties
Format
=
"{}{0:F1}"
/>
</
telerik:RadialScale.Label
>
<
telerik:IndicatorList
>
<
telerik:Needle
x:Name
=
"needle"
IsAnimated
=
"True"
Value
=
"0.75"
/>
</
telerik:IndicatorList
>
</
telerik:RadialScale
>
</
telerik:RadialGauge
>
</
telerik:RadGauge
>
For more information please take a look to the Format topic of our online documentation:
http://www.telerik.com/help/silverlight/radgauge-features-labels-format.html
Best wishes,
Andrey Murzov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Anj
Top achievements
Rank 1
answered on 07 Mar 2011, 05:02 AM
Thanks for the solution. It works.
Is there a way I can control the number of decimal places? With min=23.12 and max=45.67 and 3 major ticks, I have these major tick values: 26.7575, 34.395, 40.0325. Is there a way I can display say 4 decimal places for all the major ticks?
Is there a way I can control the number of decimal places? With min=23.12 and max=45.67 and 3 major ticks, I have these major tick values: 26.7575, 34.395, 40.0325. Is there a way I can display say 4 decimal places for all the major ticks?
0
Hi Anj,
The Format property represents standard Silverlight format string for numbers. You can use any numeric format string instead of "F1". For example "F4" will show 4 decimal digits:
You can find more information about standard numeric format strings here:
http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx
Kind regards,
Andrey Murzov
the Telerik team
The Format property represents standard Silverlight format string for numbers. You can use any numeric format string instead of "F1". For example "F4" will show 4 decimal digits:
<
telerik:RadialScale.Label
>
<
telerik:LabelProperties
Format
=
"{}{0:F4}"
/>
</
telerik:RadialScale.Label
>
You can find more information about standard numeric format strings here:
http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx
Kind regards,
Andrey Murzov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!