April 2006
Beginner
1114 pages
98h 16m
English
series.ApplyCustomType(ChartType)
Applies a chart type to a series. Use this method to create combo charts containing more than one chart type.
|
Argument |
Settings |
|---|---|
|
|
An |
The following code creates a chart and adds series using the SeriesCollection Add method; then it changes the chart type of the last series to create a combo chart containing both line and column chart types:
Sub AddSeries( )
Dim chrt As Chart, sc As SeriesCollection, _
sr As Series
' Create a line chart.
Set chrt = Charts.Add
chrt.ChartType = xlLine
' Get the series collection.
Set sc = chrt.SeriesCollection
' Add adds some series (plots data).
sc.Add Range("GrowthRate"), , True, True
' Get the last series.
Set sr = sc(sc.Count)
' Change its chart type.
sr.ApplyCustomType xlColumnClustered
End SubRead now
Unlock full access