|
|
The SeriesCollection Object (ISeriesCollection)
The SeriesCollection object represents the set of all data series in a single chart.
To create a SeriesCollection object, use,
Set SeriesCollection = chart.seriescollection
SeriesCollection Methods and Properties
| SeriesCollection Methods and Properties |
| Add |
Adds a series to a chart. Add takes two parameters:
Chart.SeriesCollection.Add(Area, , [Vertical])
The parameter Area specifies the values from which to plot the data series.
Area may be a range of cells (such as, "a1:c3"), or a sequence of values (such as,"{5,7,9}").
The optional parameter Vertical specifies whether to plot the series from a range of cell values by row or by column.
When Vertical is set to 0, ExcelWriter will plot the series by row. When Vertical is set to 1,
ExcelWriter will plot the series by column. The default value of Vertical is 0.
Note: If you specify the optional parameter Vertical, include two commas between Area and Vertical, for a
second parameter not used in the current version.
The following example will plot a SeriesCollection of three series, from the values in cells a1 through c3, by column.
chart.seriescollection.categorydata = "a1:a3"
chart.seriescollection.add "a1:c3", ,1
The following will plot three data series from values in a specified sequence.
chart.seriescollection.categorydata = "a1:a3"
seriescollection.add("{5,7,9}")
seriescollection.add("{3,6,2}")
seriescollection.add("{4,8,1}")
Top |
| CategoryData |
Specifies the range of Category Axis (x axis) values. CategoryData may be
assigned as a range of cells (such as, "a1:c3"), or as a sequence of values (such as,"{5,7,9}").
For example, if you want your Category Axis to range from 4 to 6, either,
- Populate cells a1 through a3 with the values 4, 5, and 6, and assign the values as follows,
chart.seriescollection.categorydata = "a1:a3" OR,
- Assign CategoryData directly from a sequence of values, as follows,
chart.seriescollection.categorydata = "{4,5,6}"
Top |
| Item |
Represents a single series in a SeriesCollection. Item is the default property of SeriesCollection,
so SeriesCollection(1) is equivalent to Charts.Item(1).
Top |
| LabelShowActualValue |
When set to True,
the chart will include series labels displaying actual Y values. LabelShowActualValue is False by default.
To set LabelShowActualValue to True, use,
seriescollection.LabelShowActualValue = true
Top |
| LabelShowCategoryAndValueAsPercent |
Property of a Pie chart. When set
to True, the chart will include series labels displaying actual category (X) values, and Y values as percents.
LabelShowCategoryAndValueAsPercent is False by default. To set LabelShowCategoryAndValueAsPercent to True, use,
seriescollection.LabelShowCategoryAndValueAsPercent = true
Top |
| LabelShowCategoryLabel |
When set
to True, the chart will include series labels displaying actual category values. LabelShowCategoryLabel
is False by default. To set LabelShowCategoryLabel to True, use,
seriescollection.LabelShowCategoryLabel = true
Top |
| LabelShowValueAsPercent |
Property of a Pie chart.
When set to True, the chart will include labels displaying
Y values as percents. LabelShowValueAsPercent is False by default. To enable LabelShowValueAsPercent, use,
seriescollection.showvalueaspercent = true
Top |
Copyright © 2003, SoftArtisans, Inc.
|
|