Returns or sets the end style for error bars. Read/write ChartEndStyleEnum .
ChartEndStyleEnum can be one of these ChartEndStyleEnum constants. |
chEndStyleCap default |
chEndStyleNone |
expression.EndStyle
expression Required. An expression that returns a ChErrorBars object
Example
This example adds error bars to all of the series in the first chart in ChartSpace1 and then sets the error amount and end style.
Sub Add_Error_Bars()
Dim ebErrorBars
Dim serChartSeries
Dim chConstants
Set chConstants = ChartSpace1.Constants
' Loop through all of the series in the first chart
' in ChartSpace1.
For Each serChartSeries in ChartSpace1.Charts(0).SeriesCollection
' Add error bars to the current series.
Set ebErrorBars = serChartSeries.ErrorBarsCollection.Add
' Set the error bars to be a percentage of the value.
eberrorBars.Type = chConstants.chErrorBarTypePercent
' Set the percentage amount.
ebErrorBars.Amount = 0.05
' Set the end style of the error bars.
ebErrorBars.EndStyle = chConstants.chEndStyleNone
Next
End Sub