Series.ErrorBar 方法 (Word)Series.ErrorBar method (Word)

将误差线应用于系列。Applies error bars to the series.

语法Syntax

expression.expression. ErrorBar( _Direction_ , _Include_ , _Type_ , _Amount_ , _MinusValues_ )

_表达式_代表系列对象的变量。expression A variable that represents a 'Series' object.

参数Parameters

名称Name 必需/可选Required/Optional 数据类型Data type 说明Description
DirectionDirection 必需Required xlErrorBarDirectionxlErrorBarDirection 指定误差线方向的枚举值之一。One of the enumeration values that specifies the error bar direction.
IncludeInclude 必需Required xlErrorBarIncludexlErrorBarInclude 指定要包含的误差线部分的枚举值之一。One of the enumeration values that specifies the error bar parts to include.
TypeType 必需Required xlErrorBarTypexlErrorBarType 指定误差线类型的枚举值之一。One of the enumeration values that specifies the error bar type.
AmountAmount 可选Optional VariantVariant 误差量。The error amount. 当类型为xlErrorBarTypeCustom时用于仅正误差量。Used for only the positive error amount when Type is xlErrorBarTypeCustom.
MinusValuesMinusValues 可选Optional VariantVariant 当类型为xlErrorBarTypeCustom时负误差量。The negative error amount when Type is xlErrorBarTypeCustom.

示例Example

以下示例在活动文档中第一个图表的第一个系列的 y 轴上应用标准误差线。The following example applies standard error bars along the y-axis for series one of the first chart in the active document. 误差线按正负两个方向应用。The error bars are applied in the positive and negative directions. 应在二维折线图上运行该示例。The example should be run on a 2-D line chart.

With ActiveDocument.InlineShapes(1) 
 If .HasChart Then 
 .Chart.SeriesCollection(1).ErrorBar _ 
 Direction:=xlY, Include:=xlErrorBarIncludeBoth, _ 
 Type:=xlErrorBarTypeStError 
 End If 
End With

另请参阅See also

Series 对象Series Object