Click or drag to resize

IChartSerie ErrorBar Method (Boolean, ErrorBarIncludeType, ErrorBarType)

Creates error bar object.
Examples
The following code illustrates how to set IChartErrorBars with ErrorBarIncludeType.Plus and ErrorBarType.Percentage on Y-axis of a particular IChartSerie:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Create chart</para><para>IChart chart = worksheet.Charts.Add();</para><para>//Set range</para><para>chart.DataRange = worksheet.Range["A1:C2"];</para><para>//Set error bar</para><para>chart.Series[0].ErrorBar(true, ErrorBarIncludeType.Plus, ErrorBarType.Percentage);</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>

Namespace: Spire.Xls.Core
Assembly: Spire.XLS (in Spire.XLS.dll) Version: 15.4.0.0 (15.4.0.5046)
Syntax
IChartErrorBars ErrorBar(
	bool bIsY,
	ErrorBarIncludeType include,
	ErrorBarType type
)

Parameters

bIsY
Type: System Boolean
If true - on Y axis; otherwise on X axis.
include
Type: Spire.Xls ErrorBarIncludeType
Represents include type.
type
Type: Spire.Xls ErrorBarType
Represents error bar type.

Return Value

Type: IChartErrorBars
Return error bar objcet.
See Also