Skip to main content

How to: Add the Data Source Based Error Bars Indicator to a Chart

This example demonstrates how to plot Data Source Based Error Bars on the chart.

To do this, add a DataSourceBasedErrorBars object to the series XYSeries2D.Indicators collection. Then, specify which data members store negative and positive error values using the DataSourceBasedErrorBars.NegativeErrorDataMember and DataSourceBasedErrorBars.PositiveErrorDataMember properties.

<dxc:PointSeries2D  x:Name="pointSeries" DisplayName="Series 1">
    <dxc:PointSeries2D.Indicators>
        <dxc:DataSourceBasedErrorBars NegativeErrorDataMember="Negative"
                                      PositiveErrorDataMember="Positive"
                                      Direction="Both" 
                                      EndStyle="Cap"/>
    </dxc:PointSeries2D.Indicators>
</dxc:PointSeries2D>