RadialGauge Needle not drawn in the correct position

4 posts, 0 answers
  1. Robert
    Robert avatar
    271 posts
    Member since:
    Mar 2011

    Posted 28 Mar 2011 Link to this post

    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
  2. Robert
    Robert avatar
    271 posts
    Member since:
    Mar 2011

    Posted 28 Mar 2011 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Robert
    Robert avatar
    271 posts
    Member since:
    Mar 2011

    Posted 02 Apr 2011 Link to this post

    Thank you very much. That's the answer!
Back to Top