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

HorizontalLinearScale like WP scale

3 Answers 68 Views
Gauge
This is a migrated thread and some comments may be shown as answers.
kity
Top achievements
Rank 2
kity asked on 17 Jan 2014, 11:47 AM

Bug report title: GaugeRange.Max property not refresh correctly in MVVM. It is refresh only first time. At every value set must refresh to show correctly UI layout. In Telerik WP7 work perfect. I do not use standard BarIndicator because level start from MinValue.

 

This example scale start at the middle - 0  (like wp7 default behaviors functionality).

 

       <ListBox ItemsSource="{Binding listCollection, Mode=TwoWay}" Grid.Row="1">

            <ListBox.ItemTemplate>

                <DataTemplate>

 

                    <Grid>

                        <Grid.ColumnDefinitions>

                            <ColumnDefinition Width="100" />

                            <ColumnDefinition Width="300" />

                            <ColumnDefinition Width="60" />

                            <ColumnDefinition Width="60" />

                        </Grid.ColumnDefinitions>

                        <Grid.RowDefinitions>

                            <RowDefinition Height="70"/>

                        </Grid.RowDefinitions>                     

                        <telerik:RadHorizontalLinearGauge Grid.Column="1" >

                            <!--MajorTicks="4" MiddleTicks="4" MinorTicks="1" MajorTickRelativeWidth="0.004*" MiddleTickRelativeWidth="0.004*" MajorTickLocation="OverCenter" MiddleTickLocation="CenterInside" MinorTickLocation="Inside"-->

                            <telerik:HorizontalLinearScale Min="{Binding Path=MinValue}" Max="{Binding Path=MaxValue}" LabelTemplate="{StaticResource TickLabelEmpty}" >                             

                                <telerik:HorizontalLinearScale.CustomItems>

                                    <!--

                                    <telerik:GaugeRange Min="{Binding Path=MinValue}" Max="{Binding Path=MaxValue}" Background="BlueViolet"   LabelForeground="BlueViolet" />

                                    <telerik:GaugeRange Min="{Binding Path=MinValue}" Max="{Binding Path=MaxValue}" Background="CadetBlue" LabelForeground="CadetBlue" />

                                    -->

                                    <telerik:GaugeRange Min="0" Max="{Binding Value}" Background="BlueViolet"   LabelForeground="BlueViolet"

                                                    Visibility="{Binding Path=InOutType, Mode=TwoWay, Converter={StaticResource enumToVisibilityConvert}, ConverterParameter={extend:Static Member=local:InOut.PullIn }}" />

                                    <telerik:GaugeRange Min="0" Max="{Binding Value}" Background="CadetBlue" LabelForeground="CadetBlue"

                                                    Visibility="{Binding Path=InOutType, Mode=TwoWay, Converter={StaticResource enumToVisibilityConvert}, ConverterParameter={extend:Static Member=local:InOut.PayOut }}"   />

                                    <TextBlock Text="{Binding Mooring}"  TextAlignment="Center" 

                                               telerik:ScaleObject.Value="{Binding Value}"

                                               telerik:LinearScale.RotateForVertical="True"

                                               telerik:ScaleObject.RelativeWidth="0.3*"

                                               telerik:ScaleObject.RelativeHeight="0.3*"

                                               telerik:ScaleObject.Location="CenterOutside"  />

                                </telerik:HorizontalLinearScale.CustomItems>

                                <telerik:HorizontalLinearScale.Indicators>

                                    <telerik:LinearScaleMarker x:Name="verticalLinearScaleMarker" Value="{Binding Value}" IsAnimated="true"

                                        telerik:ScaleObject.Offset="-0.04*"

                                        telerik:LinearScale.RotateForVertical="True"

                                        telerik:ScaleObject.RelativeWidth="0.03*"

                                        telerik:ScaleObject.RelativeHeight="0.09*"

                                        telerik:ScaleObject.Location="CenterOutside" />

                                </telerik:HorizontalLinearScale.Indicators>                                                                                                

                                <telerik:HorizontalLinearScale.LabelTemplate x:Name="TickLabelEmpty">

                                    <DataTemplate>

                                        <Grid/>

                                    </DataTemplate>                       

                                </telerik:HorizontalLinearScale.LabelTemplate>                                                   

                            </telerik:HorizontalLinearScale>                                                   

                        </telerik:RadHorizontalLinearGauge>

                    </Grid>

                </DataTemplate>

            </ListBox.ItemTemplate>

        </ListBox>

3 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 20 Jan 2014, 04:14 PM
Hello Kity,

Unfortunately the gauge control currently doesn't provide this functionality and it does not seem to be a trivial one. I will make sure it is reconsidered when discussing our future plans, but I am afraid no certain time frame can be given at the moment.

Regards,
Andrey Murzov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.

Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.

Sign up for Free application insights >>
0
kity
Top achievements
Rank 2
answered on 29 Jan 2014, 08:22 AM
Bar chart scale zero to be in center.

How to place zero (0)  to be always in the center position. Like first
(top) image?

If intervals length of -> positive (from
0 to +n) and negative (from -n to 0) are different, zero is not in center (see
bottom image).









0
Pavel R. Pavlov
Telerik team
answered on 03 Feb 2014, 05:45 AM
Hi,

I will answer to this question in your other thread. Please refer to it.

Regards,
Pavel R. Pavlov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
Gauge
Asked by
kity
Top achievements
Rank 2
Answers by
Andrey
Telerik team
kity
Top achievements
Rank 2
Pavel R. Pavlov
Telerik team
Share this question
or