How to Add Error Bars to a Chart Series
The example shows how to add error bars for a chart series.
Follow the steps below to create an error bar:
Call the Add method to create an error bar for a chart series.
Specify the properties of the created ErrorBarsOptions object.
The code sample below creates error bars for a line chart:
using DevExpress.Spreadsheet.Charts;
//...
spreadsheetControl1.LoadDocument("Document.xlsx");
var chart1 = spreadsheetControl1.ActiveWorksheet.Charts[0];
ErrorBarsOptions errorBar = chart1.Series[0].ErrorBars.Add(ErrorBarType.Both);
//Specify the error type and value
errorBar.ValueType = ErrorBarValueType.Percentage;
errorBar.Value = 10;
//Specify error bar settings
errorBar.NoEndCap = true;