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

RadialGauge Needle not drawn in the correct position

3 Answers 132 Views
Gauges
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 28 Mar 2011, 12:58 PM
Good afternoon,

There seems to be a problem with the positioning of the RadialGauge needle.
I have two buttons, one to decrement and another to increment the "value" of the needle. As the needle increments from "value" = 1 the positioning doesn't align correctly with gauge ticks.

For example:

Value = 1  - Displays 1
Value = 2 - Displays 1.9
Value = 3 - Displays 2.8
Value = 4 - Displays 3.75
....
Value = 8 - Displays 7.5

Here is my XAML:

<telerik:RadialGauge x:Name="radialGauge" Grid.Row="1"
               Width="300"
               Height="300">
    <telerik:RadialScale Min="1"
                   Max="12">
        <telerik:IndicatorList>
            <telerik:Needle x:Name="needle"  
                            Value="1"
                            IsAnimated="True" 
                            Duration="0:0:2" />
        </telerik:IndicatorList>
    </telerik:RadialScale>
</telerik:RadialGauge>


Is there a fix for this?

*** I have the latest version of the WPF RadControls (2011_1_0315)

Thank you for your time,

Rob

3 Answers, 1 is accepted

Sort by
0
Robert
Top achievements
Rank 1
answered on 28 Mar 2011, 03:57 PM
I've played around with the control a little bit more and discovered that if I alter the RadialScale "Max" setting to 11 rather than 12 then it works perfectly. I guess this is due to the number of major ticks displayed on the guage.

If I change the RadialScale "Max" value to say 6 then the control doesn't automatically re-scale the guage ticks. Instead I get the following sequence around the gauge:

1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6.

** Notice how everything has doubled up ***

If we look back to my original question where I had a RadialScale "Max" value of 12, the following sequence is presented on the scale:

1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12

** Notice that "6" is missing. Hence the needle offset **

Is there a way to fix it so that the guage knows to alter the required scale rather than doubling up or missing out numbers?

Thank you,

Rob
0
Andrey
Telerik team
answered on 30 Mar 2011, 05:32 PM
0
Robert
Top achievements
Rank 1
answered on 03 Apr 2011, 01:43 AM
Thank you very much. That's the answer!
Tags
Gauges
Asked by
Robert
Top achievements
Rank 1
Answers by
Robert
Top achievements
Rank 1
Andrey
Telerik team
Share this question
or