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

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

3 Answers 15 Views
DataBar
This is a migrated thread and some comments may be shown as answers.
kity
Top achievements
Rank 2
kity asked on 27 Feb 2014, 02:37 PM
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...

3 Answers, 1 is accepted

Sort by
0
Peshito
Telerik team
answered on 28 Feb 2014, 09:28 AM
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
0
kity
Top achievements
Rank 2
answered on 28 Feb 2014, 10:02 AM
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
0
Peshito
Telerik team
answered on 04 Mar 2014, 08:11 AM
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
Tags
DataBar
Asked by
kity
Top achievements
Rank 2
Answers by
Peshito
Telerik team
kity
Top achievements
Rank 2
Share this question
or