This documentation is archived and is not being maintained.

ChErrorBarsCollection Object


This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
ChSeries
Aa198403.parchild(en-us,office.10).gifChErrorBarsCollection
Aa198403.space(en-us,office.10).gifAa198403.parchild(en-us,office.10).gifChErrorBars

The collection of ChErrorBars objects for a single series.

Using the ChErrorBarsCollection object

The ChSeries object’s ErrorBarsCollection property returns a ChErrorBarsCollection object.

The following example adds error bars to the first series in the first chart in ChartSpace1, then sets the properties for the error bars.

Sub AddErrorBars()

    Dim chConstants
    Dim ebCollection
    Dim ebSeries1

    Set chConstants = ChartSpace1.Constants

    ' Set a variable to the collection of error bars for
    ' the first series in the first chart of Chartspace1.
    Set ebCollection = ChartSpace1.Charts(0).SeriesCollection(0).ErrorBarsCollection

    ' Add error bars to the chart.
    ebCollection.Add

    ' Set a variable to the error bars for the data series.
    Set ebSeries1 = ebCollection.Item(0)

    ' Set the error bars so that they represent a certain
    ' percentage of the value of a data point.
    ebSeries1.Type = chConstants.chErrorBarTypePercent

    ' The error bars represent 5% of a data point.
    ebSeries1.Amount = 0.05

End Sub

 

Show: