HorizontalLinearScale like WP scale

4 posts, 0 answers
  1. kity
    kity avatar
    71 posts
    Member since:
    Mar 2012

    Posted 17 Jan 2014 Link to this post

    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>

  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 20 Jan 2014 Link to this post

    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 >>
  3. DevCraft banner
  4. kity
    kity avatar
    71 posts
    Member since:
    Mar 2012

    Posted 29 Jan 2014 in reply to Andrey Link to this post

    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).









  5. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 02 Feb 2014 Link to this post

    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 >>
Back to Top