Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
760
Chart renders differently with non-zero minimum
posted

Hello,

I'm seeing the featured measure bar of the graph rendering differently dependant on whether or not I give it a zero minimum. Please refer to the images and xaml below. Thank you in advance!

 

                                        <ig:XamBulletGraph Height="70" Grid.Column="1"                                                 

                                                       MouseEnter="Bullet_MouseEnter"

                                                       MouseLeftButtonDown="Bullet_MouseLeftButtonDown" >

                                        <ig:XamBulletGraph.Scale>

                                            <ig:QuantitativeScale Opacity="{Binding Opacity}" Minimum="{Binding Min}" Maximum="{Binding Max}" Interval="{Binding Increment}">

 

                                                <ig:QuantitativeScale.Ranges>

                                                    <ig:QualitativeRange Opacity="{Binding Opacity}" Value="{Binding BadToAverageBreakpoint}" Background="#FF5a5a5a"/>

                                                    <ig:QualitativeRange Opacity="{Binding Opacity}" Value="{Binding AverageToGoodBreakpoint}" Background="#FF8d8d8d"/>

                                                </ig:QuantitativeScale.Ranges>

 

                                                <ig:QuantitativeScale.LabelGroup>

                                                    <ig:BulletGraphLabelGroup Opacity="{Binding Opacity}" StringFormat="{Binding Format}" />

                                                </ig:QuantitativeScale.LabelGroup>

 

                                            </ig:QuantitativeScale>

                                        </ig:XamBulletGraph.Scale>

 

                                        <ig:XamBulletGraph.FeaturedMeasures>

                                            <ig:FeaturedMeasure 

                                                Value="{Binding Value}" 

                                                Background="{Binding BulletColor}" 

                                                ToolTipService.ToolTip="{Binding Tooltip}" 

                                                Opacity="{Binding Opacity}" 

                                                Animation="{Binding Path=DataContext.Animation, ElementName=root, Converter={StaticResource BooleanToAnimationConverter}}">

                                                <!--We don't have FindAncestor mode on the RelativeSource markup the way WPF has, so we name the UserControl "root" and reference it as above to get at 

                                                a property on the main ViewModel, as opposed to the datacontext of the current child in the ItemsControl.-->

                                            </ig:FeaturedMeasure>

                                        </ig:XamBulletGraph.FeaturedMeasures>

                                        <ig:XamBulletGraph.ComparativeMeasures>

                                            <ig:ComparativeMeasure Value="{Binding Expected}" Opacity="{Binding Opacity}"/>

                                        </ig:XamBulletGraph.ComparativeMeasures>

 

                                    </ig:XamBulletGraph>

 

With a non-zero value for minimum:

 

With a zero for minimum:

  • 17605
    posted

    Hi,

    The BulletGraph is working in that way. This is from the BulletGraph specification:

    The Featured Measure

    This portion of the bullet graph displays the primary data and should therefore be visually

    prominent. Usually, it should be encoded as a bar, like the bar on a bar graph. The one

    exception is when the quantitative scale begins at a value greater than zero; in such a case, the

    featured measure should be encoded as a short line perpendicular to the orientation of the

    graph, a dot, or a square.

    More about this:

    http://www.perceptualedge.com/articles/misc/Bullet_Graph_Design_Spec.pdf