Value displayed is incorrect

2 posts, 1 answers
  1. dnalabs
    dnalabs avatar
    3 posts
    Member since:
    Jan 2014

    Posted 11 Feb 2014 Link to this post

    Hi,
    I have made a radial gauge with the following xaml code:

    <gauges:RadialGaugeRange TickStep="20"
                             LabelStep="20"
                             MinAngle="0"
                             MaxAngle="270"
                             MinValue="0"
                             MaxValue="300"
                             LabelRadiusScale="0.6"
                             TickRadiusScale="0.8"
                             SweepDirection="Clockwise">
                   
                    <gauges:RadialGaugeRange.TickTemplate>
                        <DataTemplate>
                            <Rectangle
                                Width="50"
                                Height="4"
                                Fill="Blue" />
                        </DataTemplate>
                       
                    </gauges:RadialGaugeRange.TickTemplate>
                    <gauges:RadialBarGaugeIndicator
                            Value="100"
                            gauges:RadialGaugeRange.IndicatorRadiusScale="0.8"
                            BarThickness="35"
                            BarBrush="Green"
                            IsAnimated="True"
                            AnimationDuration="0:0:0.5">
                       
                        <gauges:RadialBarGaugeIndicator.AnimationEasing>
                            <ElasticEase/>
                        </gauges:RadialBarGaugeIndicator.AnimationEasing>
                    </gauges:RadialBarGaugeIndicator>
                </gauges:RadialGaugeRange>

    Now, as you can see, i have set the value at 100, but the radial bar is pointing somewhere around 65.
    Am i doing anything wrong?

    Also, i am not getting any small gauge icon as described in http://www.telerik.com/help/windows-phone/radgauge-design-time-support.html .
    Please tell me how i can use pre-defined gauges.

    Thanks 
  2. Answer
    Victor
    Admin
    Victor avatar
    1351 posts

    Posted 14 Feb 2014 Link to this post

    Hi dnalabs dev,

    You just have to set the max angle of the indicator to match the max angle of the range. Notice the attached property on the indicator:
    <gauges:RadialBarGaugeIndicator gauges:RadialGaugeRange.MaxAngle="270"
                Value="100"
                gauges:RadialGaugeRange.IndicatorRadiusScale="0.8"
                BarThickness="35"
                BarBrush="Green"/>

    In order for the design-gallery to show you must make sure that the design-time assemblies are in a subdirectory inside the directory of the Telerik.Windows.Controls.DataVisualization.dll assembly. For example if your data viz assembly is in the C:\Telerik dir. The design-time assembly for data viz must be in C:\Telerik\design.
    One final note, the design-time assembly is called Telerik.Windows.Controls.DataVisualization.VisualStudio.Design.5.0.dll.

    Please write again if you have more questions.

    Regards,
    Victor
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peek previews directly from the developers working on the UI for Windows Phone, subscribe to the blog feed now.
  3. DevCraft banner
Back to Top