Totaly wrong, why first and second scale is diferent when change size of browser?

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

    Posted 27 Feb 2014 Link to this post

    Let make simple test.
    This is xaml

    <Grid x:Name="LayoutRoot">
     
     
      
     
            <telerik:HeaderedItemsControl >
                    <telerik:HeaderedItemsControl.Items >
                        <ItemsControl>                     
                            <telerik:RadDataBar MinHeight="30" BarHeightPercent="1"
                                                Value="-5.40"
                                                Minimum="-3053822.75"
                                                Maximum="3053822.75"                                                
                                                BorderBrush="Black" BorderThickness="1" Margin="2"
                                                LabelFormat="0.# m"
                                                NegativeValueBrush="Red"
                                                ValueBrush="Green"
                                                LabelPosition="EndOfBarOutside" AxisStroke="#FF10EA24" Foreground="Black" />
                        </ItemsControl>
                        <ItemsControl>
                            <telerik:RadDataBar MinHeight="30" BarHeightPercent="1"
                                                Value="5.40"
                                                Minimum="-3053822.75"
                                                Maximum="3053822.75"                                                
                                                BorderBrush="Black" BorderThickness="1" Margin="2"
                                                LabelFormat="0.# m"
                                                NegativeValueBrush="Red"
                                                ValueBrush="Green"
                                                LabelPosition="EndOfBarOutside" AxisStroke="#FF10EA24" Foreground="Black" />
                        </ItemsControl>
                        <ItemsControl>
                            <telerik:RadDataBar MinHeight="30" BarHeightPercent="1"
                                                Value="22000.75"
                                                Minimum="-3053822.75"
                                                Maximum="3053822.75"                                                
                                                BorderBrush="Black" BorderThickness="1" Margin="2"
                                                LabelFormat="0.# m"
                                                NegativeValueBrush="Red"
                                                ValueBrush="Green"
                                                LabelPosition="EndOfBarOutside" AxisStroke="#FF10EA24" Foreground="Black" />
                        </ItemsControl>
                        <ItemsControl>
                            <telerik:RadDataBar MinHeight="30" BarHeightPercent="1"
                                                Value="-22000.75"
                                                Minimum="-3053822.75"
                                                Maximum="3053822.75"                                                
                                                BorderBrush="Black" BorderThickness="1" Margin="2"
                                                LabelFormat="0.# m"
                                                NegativeValueBrush="Red"
                                                ValueBrush="Green"
                                                LabelPosition="EndOfBarOutside" AxisStroke="#FF10EA24" Foreground="Black" />
                        </ItemsControl>
                        <ItemsControl>
                            <telerik:RadDataBar MinHeight="30" BarHeightPercent="1"
                                                Value="3053822.75"
                                                Minimum="-3053822.75"
                                                Maximum="3053822.75"                                                
                                                BorderBrush="Black" BorderThickness="1" Margin="2"
                                                LabelFormat="0.# m"
                                                NegativeValueBrush="Red"
                                                ValueBrush="Green"
                                                LabelPosition="EndOfBarOutside" AxisStroke="#FF10EA24" Foreground="Black" />
                        </ItemsControl>
                    <ItemsControl>
                        <telerik:RadDataBar MinHeight="30" BarHeightPercent="1"
                                                Value="500.75"
                                                Minimum="-3053822.75"
                                                Maximum="3053822.75"                                                
                                                BorderBrush="Black" BorderThickness="1" Margin="2"
                                                LabelFormat="0.# m"
                                                NegativeValueBrush="Red"
                                                ValueBrush="Green"
                                                LabelPosition="EndOfBarOutside" AxisStroke="#FF10EA24" Foreground="Black" />
                    </ItemsControl>
     
     
                </telerik:HeaderedItemsControl.Items>
                </telerik:HeaderedItemsControl>
         
     
        </Grid>


    Run project and change layout size of browser with mouse.
    Some time show wrong chart, sometime it is correct.
    This control not work! See first two scale and change browser size.

    See attached image...
  2. Peshito
    Admin
    Peshito avatar
    497 posts

    Posted 28 Feb 2014 Link to this post

    Hello,

    The reason why the databar flickers is because your range is very big and the value is too small. When the browser is resized the value of the databar width that should be displayed is recalculated and there is a rounding error. For example if it is 0.4 it won't appear but if it is 0.6 it will. May I ask you how do you expect the DataBar to behave in this scenario? Such information is valuable for us and will be taken into consideration on how to further improve the DataBar control.

    Regards,
    Peshito
    Telerik
  3. DevCraft banner
  4. kity
    kity avatar
    71 posts
    Member since:
    Mar 2012

    Posted 28 Feb 2014 in reply to Peshito Link to this post

    I accept your answer about rounding error but I can reproduce this bug when dinamcly change min/max interval without resize browser. Again this bug is valid and sorry but I cannot accept this aswer for 100% truly.

    Please, make test in your Telerik laboratory. Make 10 databars in collection with diferent values and dynamcly change range min/max.
    You will see at the end that some time positive is show when range is big integer and value property is small
  5. Peshito
    Admin
    Peshito avatar
    497 posts

    Posted 04 Mar 2014 Link to this post

    Hello,

    The size of the databar is a function of two variables - the size of the window and the value of the databar. When the value which should be visualized does not meet the requirement for drawing one pixel, then the databar won't be visualized no matter that it actually has a value. Changing the size of the browser and playing with different databar range values will result in the same behavior as already described.

    As I asked earlier, could you describe how do you expect the databar to work in such scenarios. This will help us understand our clients scenarios and consider its improvement for the upcoming releases.

    Regards,
    Peshito
    Telerik
Back to Top