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

180% Radial gauge. Low Max numbers

3 Answers 70 Views
Chart
This is a migrated thread and some comments may be shown as answers.
mark reed
Top achievements
Rank 1
mark reed asked on 20 Nov 2009, 05:54 PM
I'm brand new to this product so forgive my ignorance :)

I'm trying to create a 180% where the Max value is a low number like 3. When I do this the majorticks go something like this 0 0 0 1 1 1 2 2 2.

Does anyone know how to make it like this .25 .50 .75 1 1.25 1.50 2.75 3.0 etc....?

3 Answers, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 25 Nov 2009, 03:32 PM
Hello mark reed,

You can achieve the desired effect by setting RadialScale.MajorTickStep="0.25" and on RadialScale.Label -- Format="{}{0:n2}" like this:

<Grid x:Name="LayoutRoot">
    <Grid.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary
                        Source="/Telerik.Windows.Controls.Gauge;component/Themes/Generic.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Grid.Resources>
     
    <control:RadGauge x:Name="radGauge">
        <gauge:RadialGauge x:Name="radialGauge"
                           Style="{StaticResource RadialGaugeHalfCircleNStyle}">
            <gauge:RadialScale x:Name="radialScale" Min="0" Max="3" MajorTickStep="0.25"
                               Style="{StaticResource RadialScaleHalfCircleNStyle}">
                <gauge:RadialScale.MajorTick>
                    <gauge:MajorTickProperties />
                </gauge:RadialScale.MajorTick>
                <gauge:RadialScale.MiddleTick>
                    <gauge:MiddleTickProperties Length="0.05" TickWidth="0.2" />
                </gauge:RadialScale.MiddleTick>
                <gauge:RadialScale.MinorTick>
                    <gauge:MinorTickProperties Length="0.03" TickWidth="0.3" />
                </gauge:RadialScale.MinorTick>
                <gauge:RadialScale.Label>
                    <gauge:LabelProperties Format="{}{0:n2}" />
                </gauge:RadialScale.Label>
                <gauge:IndicatorList>
                    <gauge:Needle x:Name="needle"
                                  IsAnimated="True"
                                  Value="65"/>
                </gauge:IndicatorList>
            </gauge:RadialScale>
        </gauge:RadialGauge>
    </control:RadGauge>
</Grid>


Hope this helps.


Greetings,
Manuel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
mark reed
Top achievements
Rank 1
answered on 27 Nov 2009, 02:21 PM
Yes it does help however now I am stuck trying to go the other way.

I want to make 4,000,000 become 4m or 4,500,000 become 4.5m and 4,000 become 4k.

Is there anyway to do that? I've tried passing things like {#,}:{}k or {0,,}:{}m

Thanks
0
mark reed
Top achievements
Rank 1
answered on 27 Nov 2009, 02:29 PM
Nevermind I figured it out.
{0:#,}k
Tags
Chart
Asked by
mark reed
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
mark reed
Top achievements
Rank 1
Share this question
or