ErrorBar Method
Applies To
Series object.
Description
Applies error bars to the specified series.
Syntax
expression.ErrorBar(Direction, Include, Type, Amount, MinusValues)
expression Required. An expression that returns a Series object.
Direction Optional Variant. The error bar direction. Can be one of the following XlErrorBarDirection constants: xlX or xlY. xlX can only be used with scatter charts. The default value is xlY.
Include Optional Variant. The error bar parts to be included. Can be one of the following XlErrorBarInclude constants: xlErrorBarIncludePlusValues, xlErrorBarIncludeMinusValues, xlErrorBarIncludeNone, or xlErrorBarIncludeBoth. The default value is xlErrorBarIncludeBoth.
Type Optional Variant. The error bar type. Can be one of the following XlErrorBarType constants: xlErrorBarTypeFixedValue, xlErrorBarTypePercent, xlErrorBarTypeStDev, xlErrorBarTypeStError, or xlErrorBarTypeCustom.
Amount Optional Variant. The error amount. Used for only the positive error amount when Type is xlErrorBarTypeCustom.
MinusValues Optional Variant. The negative error amount when Type is xlErrorBarTypeCustom.
See Also
ErrorBars property, HasErrorBars property.
Example
This example applies standard error bars in the Y direction for series one. The error bars are applied in the positive and negative directions. The example should be run on a 2-D line chart.
myChart.SeriesCollection(1).ErrorBar _
Direction:=xlY, Include:=xlErrorBarIncludeBoth, _
Type:=xlErrorBarTypeStError