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

Value displayed is incorrect

1 Answer 29 Views
Gauge
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
dnalabs
Top achievements
Rank 1
dnalabs asked on 11 Feb 2014, 07:30 PM
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 

1 Answer, 1 is accepted

Sort by
0
Accepted
Victor
Telerik team
answered on 14 Feb 2014, 09:56 AM
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.
Tags
Gauge
Asked by
dnalabs
Top achievements
Rank 1
Answers by
Victor
Telerik team
Share this question
or