Skip to main content

DevExpress v25.1 Update — Your Feedback Matters

Our What's New in v25.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

How to: Plot the Percentage Error Bars Indicator on a Chart

This example demonstrates how to plot Percentage Error Bars on a chart.

To do this, add a PercentageErrorBars object to the series view XYDiagram2DSeriesViewBase.Indicators collection. Then, define the percentage of error values using the PercentageErrorBars.Percent property.

private void FormOnLoad(object sender, EventArgs e) {
    this.productsTableAdapter.Fill(this.nwindDataSet.Products);
    PointSeriesView view = (PointSeriesView)chartControl.Series[0].View;
    view.Indicators.Add(new PercentageErrorBars {
        Percent = 10,
        Direction = ErrorBarDirection.Both,
        ShowInLegend = true,
        Name = "Units on Custom Order"
    });
}
See Also