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

Custom the Radial Gauges Scale

2 Answers 91 Views
Gauge
This is a migrated thread and some comments may be shown as answers.
xu qing
Top achievements
Rank 1
xu qing asked on 23 Mar 2010, 02:07 AM
Hi,
    I use the radial gauge to display the realtime network data send speed,but the default scale of radial gauge is between 0 to 100.the max value 100  is not enough for this usage.So I want to change the max value of scale.
    I try to use the Min and Max Property to change the max value,but it doesn't work.the max value is still 100.below is my code:

    <control:RadGauge>
            <Grid>
                <gauge:RadialGauge>
                    <gauge:RadialScale x:Name="scalue1" Min="0" Max="1000" MajorTicks="10" MiddleTicks="1">
                        <gauge:RadialScale>
                            <gauge:RadialScale.MiddleTick>
                                <gauge:MiddleTickProperties Length="0.08" />
                            </gauge:RadialScale.MiddleTick>
                            <gauge:RadialScale.MajorTick>
                                <gauge:MajorTickProperties Length="0.11"></gauge:MajorTickProperties>
                            </gauge:RadialScale.MajorTick>
                            <gauge:RadialScale.Label>
                                <gauge:LabelProperties FontSize="10" Location="Outside" />
                            </gauge:RadialScale.Label>
                        </gauge:RadialScale>
                        <gauge:IndicatorList>
                            <gauge:Needle x:Name="gauge1_needle" IsAnimated="true" Value="0" />
                        </gauge:IndicatorList>
                    </gauge:RadialScale>
                </gauge:RadialGauge>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="0.53*" />
                        <RowDefinition Height="0.47*" />
                    </Grid.RowDefinitions>
                    <TextBlock Grid.Row="1" Text="NetWork" HorizontalAlignment="Center" Foreground="GhostWhite"></TextBlock>
                </Grid>
            </Grid>
        </control:RadGauge>

    Please help me,thank you.

2 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 23 Mar 2010, 08:53 AM
Hi xu qing,

You've inserted extra gauge:RadialScale element in your code:
<gauge:RadialGauge>
 <gauge:RadialScale x:Name="scalue1" Min="0" Max="1000" MajorTicks="10" MiddleTicks="1">
  <gauge:RadialScale>
The last RadialScale element is redundant. It overlaps the RadialScale element which has Min and Max properties set to the necessary values.
You should remove it to get things working (see fixed code below).
<control:RadGauge>
    <Grid>
        <gauge:RadialGauge>
            <gauge:RadialScale x:Name="scalue1" Min="0" Max="1000" MajorTicks="10" MiddleTicks="1">
                <gauge:RadialScale.MiddleTick>
                    <gauge:MiddleTickProperties Length="0.08" />
                </gauge:RadialScale.MiddleTick>
                <gauge:RadialScale.MajorTick>
                    <gauge:MajorTickProperties Length="0.11"></gauge:MajorTickProperties>
                </gauge:RadialScale.MajorTick>
                <gauge:RadialScale.Label>
                    <gauge:LabelProperties FontSize="10" Location="Outside" />
                </gauge:RadialScale.Label>
                <gauge:IndicatorList>
                    <gauge:Needle x:Name="gauge1_needle" IsAnimated="true" Value="0" />
                </gauge:IndicatorList>
            </gauge:RadialScale>
        </gauge:RadialGauge>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="0.53*" />
                <RowDefinition Height="0.47*" />
            </Grid.RowDefinitions>
            <TextBlock Grid.Row="1" Text="NetWork" HorizontalAlignment="Center" Foreground="GhostWhite"></TextBlock>
        </Grid>
    </Grid>
</control:RadGauge>


Best wishes,
Andrey Murzov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
xu qing
Top achievements
Rank 1
answered on 23 Mar 2010, 09:34 AM
Thank you,It Works.
Tags
Gauge
Asked by
xu qing
Top achievements
Rank 1
Answers by
Andrey
Telerik team
xu qing
Top achievements
Rank 1
Share this question
or