The Series Object (ISeries)
The Series object represents a single data series in a chart.
To create a Series object, use the SeriesCollection's
Add method, as in the following example.
set series1 = chart.seriescollection.add("a1:c1")
Note on Series, LabelFrame, and DataLabels
The property values on the LabelFrame
object and the label related property values on the Series object
will be used as the defaults for all data labels. However, once a
data label is accessed through the DataLabels collection, the label no
longer be affected by changes to properties on LabelFrame or
Series. |
| Series Methods and Properties |
Area
Syntax
[VBScript]
Property Area As SAArea (read-only)
Description
Example
[VBScript]
'--- Create an instance of ExcelWriter
'--- and add a column chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsColumnChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- The Area property returns an SAArea object
'--- you can use to format
'--- the data series area
'--- Set the foreground color of a data series area to red.
'--- ColorTranslator and Color are in the System.Drawing namespace
Series.Area.ForegroundColor = RGB(255,0,0)
Top |
AxisGroup
Syntax
[VBScript]
Property AxisGroup As ASXAxisGroup (read/write)
Description
The AxisGroup property is only available for the
chart type Column Line 2 Axes.
AxisGroup sets or returns the axis type - primary or secondary -
that the specified series is associated with. Set AxisGroup to
an ASXAxisGroup value, by name or number:
| ASXAxisGroup Values |
saxlsPrimaryAxis | 1 |
saxlsSecondaryAxis | 2 |
Example
[VBScript]
'--- Create an instance of ExcelWriter
'--- and add a column line 2 axes chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsColumnLine2AxesChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- For ColumnLine2Axes charts, use the AxisGroup property
'--- to determine which axis a series will represent
'--- Set the series "Series" to the second axis
Series.AxisGroup = saxlsSecondaryAxis
Top |
Border
Syntax
[VBScript]
Property Border As SALine (read/write)
Description
Returns a Line object, representing the border of a data series.
The properties of Border are LineColor, LineFormatting,
LineStyle, and
LineWeight.
Note: To display a series border and its markers in one solid
color, set all of the following properties to the desired color:
Example
[VBScript]
'--- Create an instance of ExcelWriter
'--- and add a column chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsColumnChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- Use the Border property to format series borders
Series.Border.LineColor = RGB(255,0,0)
Series.MarkerFormat.BackgroundColor = RGB(255,0,0)
Series.MarkerFormat.ForegroundColor = RGB(255,0,0)
Top |
ChartType
Syntax
[VBScript]
Property ChartType As ASXChartType (read/write)
Description
The ChartType property is only available for the
chart types Column Line and
Column Line 2 Axes.
ChartType sets or returns a chart type
for the specified series.
| ASXChartType Values for Series.ChartType |
saxlsColumnChart | 0 |
saxlsLineChart | 2 |
Example
[VBScript]
'--- Create an instance of ExcelWriter and
'--- add a column line chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsColumnLineChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- For Column Line and Column Line 2 Axes charts
'--- Use ChartType to set the chart type fo the series
'--- Set the chart type to Line Chart
Series.ChartType = saxlsLineChart
Top |
ChartSubType
Syntax
[VBScript]
Property ChartSubType As Integer (read/write)
Description
The ChartSubType property is only available for the
chart types Column Line and
Column Line 2 Axes.
ChartSubType sets or returns a chart sub-type for the specified series.
The sub-type specifies whether the series is not stacked, stacked, or 100% stacked.
You will find chart type and sub-type images in Chart Codes.
ChartSubType is a Read/Write value.
| ChartSubType Values |
| Not stacked | 0 (default) |
saxlsStacked | 1 |
saxls100PercentStacked | 2 |
Example
[VBScript]
'--- Create an instance of ExcelWriter and
'--- add a column line chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsColumnLineChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- For Column Line and Column Line 2 Axes charts
'--- Use ChartType to set the chart type fo the series
'--- Set the chart type to Line Chart
Series.ChartType = saxlsLineChart
'--- Also, set the chart subtype
Series.ChartSubType = saxlsStacked
Top |
DataLabels
Syntax
[VBScript]
Property DataLabels As IDataLabels (read-only)
Description
Returns a DataLabels object
which represents the collection of data labels for the specified series.
A data label displays information about a series data point.
Example
[VBScript]
Dim xlw
Dim ws
Dim chart
Dim series
Set xlw = Server.CreateObject("softartisans.excelwriter")
set ws = xlw.worksheets(1)
...
Set chart = ws.charts.add(7,3,3,5,20,18)
...
set series = chart.seriescollection(1)
...
series.DataLabels(1).Text = "A"
series.DataLabels(2).Text = "B"
series.DataLabels(3).Text = "C"
...
Top |
ErrorBar
Syntax
[VBScript]
Property ErrorBar As ASXErrorBarType (read/write)
Description
Sets or returns the error bar type for a series. Error bars display potential error, in
relation to data points. The following chart types may include Y error bars:
Bar,
Two-dimensional Area,
Column,
Line, and
Scatter. X error bars will display only in Scatter
charts. ErrorBar has five possible values:
| saxlsErrorBarNone | 0 (Default value) |
| saxlsXDirectionPlus | 1 |
| saxlsXDirectionMinus | 2 |
| saxlsYDirectionPlus | 4 |
| saxlsYDirectionMinus | 8 |
Example
[VBScript]
'--- Create an instance of ExcelWriter and
'--- add a column chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsColumnChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- Set the error bar type for the series to saxlsXDirectionMinus
Series.ErrorBar = saxlsXDirectionMinus
Top |
ErrorBarLine
Syntax
[VBScript]
Property ErrorBarLine As SALine (read-only)
Description
Example
[VBScript]
'--- Create an instance of ExcelWriter and
'--- add a column chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsColumnChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- Set the error bar type for the series to saxlsXDirectionMinus
Series.ErrorBar = saxlsXDirectionMinus
'--- Format the error bar with the ErrorBarLine property
'--- ErrorBarLine returns SALine
'--- Make the line green
Series.ErrorBarLine.LineColor = RGB(0,255,0)
Top |
HasSmoothedLine
Syntax
[VBScript]
Property HasSmoothedLine As Boolean (read/write)
Description
Valid only for scatter charts.
When set to True, data points are connected by smoothed lines, that is, interpolated values, rather than real values,
are displayed.
Example
[VBScript]
'--- Create an instance of ExcelWriter and
'--- add a scatter chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsScatterChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- For scatter charts, connect all data points with a smooth line
Series.HasSmoothedLine = True
Top |
LabelFrame
Syntax
[VBScript]
Property LabelFrame As IChartFrame (read-only)
Description
Returns a ChartFrame object,
representing the area of the series labels. The properties of LabelFrame are,
Area,
Border,
HasShadow,
Height,
Text,
TextFont,
TextHorizontalAlignment,
TextRotationAngle,
TextVerticalAlignment,
Width,
X, and
Y.
Example
[VBScript]
'--- Create an instance of ExcelWriter and
'--- add a column chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsColumnChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- LabelFrame returns an IChartFrame interface
'--- you can use to format
'--- the frame area around labels
'--- Set the LabelFrame ForegroundColor to red.
Series.LabelFrame.Area.ForegroundColor = RGB(255,0,0)
Top |
LabelShowActualValue
Syntax
[VBScript]
Property LabeLShowActualValue As Boolean (read/write)
Description
When set to True, the series will include labels displaying actual Y values.
LabelShowActualValue is False by default.
Example
[VBScript]
'--- Create an instance of ExcelWriter and
'--- add a column chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsColumnChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- Include labels that show actual Y axis values
Series.LabelShowActualValue = True
Top |
LabelShowCategoryAndValueAsPercent
Syntax
[VBScript]
Property LabelShowCategoryAndValueAsPercent As Boolean (read/write)
Description
Property of a Pie chart. When set
to True, the series will include labels displaying actual category (X) values, and Y values as percents.
LabelShowCategoryAndValueAsPercent is False by default.
Example
[VBScript]
'--- Create an instance of ExcelWriter and
'--- add a pie chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsPieChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- For a Pie chart, show X and Y values as percents
Series.LabelShowCategoryAndValueAsPercent = True
Top |
LabelShowCategoryLabel
Syntax
[VBScript]
Property LabelShowCategoryLabel As Boolean (read/write)
Description
Property of a Pie chart. When set
to True, the series will include labels displaying actual category (X) values, and Y values as percents.
LabelShowCategoryLabel is False by default.
Example
[VBScript]
'--- Create an instance of ExcelWriter and
'--- add a pie chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsPieChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- For Pie charts, include labels displaying actual
'--- category (X) values, and Y values as percents
Series.LabelShowCategoryLabel = True
Top |
LabelShowValueAsPercent
Syntax
[VBScript]
Property LabelShowValueAsPercent As Boolean (read/write)
Description
When set to True, the series will include labels displaying
Y values as percents. LabelShowValueAsPercent is False by default.
Example
[VBScript]
'--- Create an instance of ExcelWriter and
'--- add a column chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsColumnChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- Show Y values as percents
Series.LabelShowValueAsPercent = True
Top |
MarkerFormat
Syntax
[VBScript]
Property MarkerFormat As SAArea (read-only)
Description
Example
[VBScript]
'--- Create an instance of ExcelWriter and
'--- add a line chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsLineChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- Setting the properties of MarkerFormat will have no
'--- effect unless the following is set:
Series.MarkerFormat.AreaFormatting = ASXCreationType.saxlsCreationCustom
'--- The MarkerFormat property returns an SAArea object
'--- that can be used
'--- to format the data markers of a chart
'--- (see description for applicable chart types)
'--- Set the foreground color to Blue
Series.MarkerFormat.ForegroundColor = RGB(0,0,255)
Top |
MarkerSize
Syntax
[VBScript]
Property MarkerSize As Long (read/write)
Description
Sets or retrieves the size of series data markers.
A data marker marks a single value in a series, corresponding to a single cell value.
Line, radar, and
scatter charts can include data
markers.
Setting MarkerSize will have no effect unless you set:
MarkerFormat.AreaFormatting = ASXCreationType.saxlsCreationCustom
Top |
MarkerType
Syntax
[VBScript]
Property MarkerType As ASXMarkerType (read/write)
Description
Sets or retrieves a data marker type for a series. A data marker marks
a single value in a series, corresponding to a single cell value. Line,
radar, and scatter charts may have data
markers. ExcelWriter supports ten marker types, listed in the following table.
Setting MarkerType will have no effect unless you set:
MarkerFormat.AreaFormatting = ASXCreationType.saxlsCreationCustom
| NoMarker | 0 |
| Square | 1 |
| Diamond | 2 |
| Triangle | 3 |
| X | 4 |
| Star | 5 |
| DowJones | 6 |
| StandardDeviation | 7 |
| Circle | 8 |
| PlusSign | 9 |
Example
[VBScript]
'--- Create an instance of ExcelWriter and
'--- add a line chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsLineChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- Setting MarkerType will have no
'--- effect unless the following is set:
Series.MarkerFormat.AreaFormatting = ASXCreationType.saxlsCreationCustom
'--- Set the type of data marker to triangle
Series.MarkerType = 3
Top |
Name
Syntax
[VBScript]
Property Name As String (read/write)
Description
Sets or retrieves the name of a single series.
Example
[VBScript]
'--- Create an instance of ExcelWriter and
'--- add a column chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsColumnChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- Give a unique name to the series
Series.Name = "Sales Data"
Top |
ScatterValues
Syntax
[VBScript]
Property ScatterValues As String (read/write)
Description
Sets or retrieves the range of cells containing the values of a
scatter chart data series.
Example
[VBScript]
'--- Create an instance of ExcelWriter and
'--- add a scatter chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsScatterChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- For a scatter chart, assign the values
'--- in cells c1:c3 to the series
Series.ScatterValues = "C1:C3"
Top |
ShowInLegend
Syntax
[VBScript]
Property ShowInLegend As Boolean (read/write)
Description
Determines whether or not the specified series will appear
in the chart's legend. ShowInLegend is set to
True by default.
Example
[VBScript]
series.ShowInLegend = False
Top |
SpaceBetweenBars
Syntax
[VBScript]
Property SpaceBetweenBars As Integer (read/write)
Description
Sets or retrieves the space between the bars of the specified
data series. SpaceBetweenBars is a Read/Write
property. By default, SpaceBetweenBars is set
to the value of Chart.SpaceBetweenBars.
Example
[VBScript]
'--- Create an instance of ExcelWriter and
'--- add a column chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsColumnChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- Adjust the space between bars for the data series
Series.SpaceBetweenBars = 10
Top |
SpaceBetweenCategories
Syntax
[VBScript]
Property SpaceBetweenCategories As Integer (read/write)
Description
Sets or retrieves the space between space between the categories
of the specified data series. SpaceBetweenCategories is a Read/Write
property. By default, SpaceBetweenCategories is set
to the value of Chart.SpaceBetweenCategories.
Example
[VBScript]
'--- Create an instance of ExcelWriter
'--- and add a column chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsColumnChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- Adjust the space between categories for the data series
Series.SpaceBetweenCategories = 10
Top |
Values
Syntax
[VBScript]
Property Values As String (read/write)
Description
Sets or retrieves the range of cells from which to plot a
data series.
Top |
XErrorBarCustomMinusValues
Syntax
[VBScript]
Property XErrorBarCustomMinusValues As String (read/write)
Descriptions
Sets or returns a custom minus error value for the X
ErrorBar. To assign XErrorBarCustomMinusValues, set
XErrorBarValueSource to 4 (saxlsCustom).
Note: Only Scatter charts will
display X error bars.
Example
[VBScript]
'--- Create an instance of ExcelWriter and
'--- add a column chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsColumnChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- First, set XErrorBarValueSource to saxlsCustom
Series.XErrorBarValueSource = saxlsCustom
'--- Now set the custom minus value
Series.XErrorBarCustomMinusValues = 5
Top |
XErrorBarCustomPlusValues
Syntax
[VBScript]
Property XErrorBarCustomPlusValues As String (read/write)
Description
Sets or returns a custom plus error value for the X
ErrorBar. To assign XErrorBarCustomPlusValues, set
XErrorBarValueSource to 4 (saxlsCustom).
Note: Only Scatter charts
will display X error bars.
Example
[VBScript]
'--- Create an instance of ExcelWriter and
'--- add a scatter chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsScatterChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- First, set XErrorBarValueSource to saxlsCustom
Series.XErrorBarValueSource = saxlsCustom
'--- Now set the custom plus value
Series.XErrorBarCustomPlusValues = 5
Top |
XErrorBarTShaped
Syntax
[VBScript]
Property XErrorBarTShaped As Boolean (read/write)
Description
Sets or returns the shape of the X ErrorBar.
When XErrorBarTShaped is set to True, the X error bar will be T shaped. When XErrorBarTShaped is set to False,
the X error bar will be a line. XErrorBarTShaped is True by default.
Note: Only Scatter charts will display
X error bars.
Example
[VBScript]
'--- Create an instance of ExcelWriter and
'--- add a scatter chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsScatterChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- XErrorBarTShaped is true by default
Series.XErrorBarTShaped = False
Top |
XErrorBarValue
Syntax
[VBScript]
Property XErrorBarValue As Double (read/write)
Description
Sets or returns the error value of an X ErrorBar.
XErrorBarValue may be a percentage, a fixed value, a standard deviation, a standard error, or a custom value, depending
on the value of XErrorBarValueSource.
Note: Only Scatter charts will
display X error bars.
Example
[VBScript]
'--- Create an instance of ExcelWriter and
'--- add a column chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsColumnChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- Set XErrorBarValue to 15 percent
Series.XErrorBarValueSource = saxlsPercentage
Series.XErrorBarValue = 15
Top |
XErrorBarValueSource
Syntax
[VBScript]
Property XErrorBarValueSource As ASXErrorBarValueSource(read/write)
Description
Sets or returns the type of error value that the X
ErrorBar will display. XErrorBarValueSource may be
any of the following.
| saxlsPercentage | 1 | A percentage of each data point |
| saxlsFixedValue | 2 | A fixed value for all data points |
| saxlsStandardDeviation | 3 | A standard deviation from the series mean |
| saxlsCustom | 4 | A custom value |
| saxlsStandardError | 5 | The standard error of the data series |
To assign a custom value, set
XErrorBarCustomMinusValues and/or
XErrorBarCustomPlusValues. To assign values to all other error types,
set XErrorBarValue.
Note: Only Scatter charts will display X
error bars.
Example
[VBScript]
'--- Create an instance of ExcelWriter and
'--- add a scatter chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsScatterChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- First, set XErrorBarValueSource to saxlsCustom
Series.XErrorBarValueSource = saxlsCustom
'--- Now set the custom plus value
Series.XErrorBarCustomPlusValues = 5
Top |
YErrorBarCustomMinusValues
Syntax
[VBScript]
Property YErrorBarCustomMinusValues As String (read/write)
Description
Sets or returns a custom minus error value for the Y
ErrorBar. To assign YErrorBarCustomMinusValues, set
YErrorBarValueSource to 4 (saxlsCustom).
Example
[VBScript]
'--- Create an instance of ExcelWriter and
'--- add a column chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsColumnChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- First, set YErrorBarValueSource to saxlsCustom
Series.YErrorBarValueSource = saxlsCustom
'--- Now set the custom minus value
Series.YErrorBarCustomMinusValues = 5
Top |
YErrorBarCustomPlusValues
Syntax
[VBScript]
Property YErrorBarCustomPlusValues As String (read/write)
Description
Sets or returns a custom plus error value for the Y
ErrorBar. To assign YErrorBarCustomPlusValues, set
YErrorBarValueSource to 4 (saxlsCustom).
Example
[VBScript]
'--- Create an instance of ExcelWriter and
'--- add a column chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsColumnChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- First, set XErrorBarValueSource to saxlsCustom
Series.XErrorBarValueSource = saxlsCustom
'--- Now set the custom plus value
Series.XErrorBarCustomPlusValues = 5
Top |
YErrorBarTShaped
Syntax
[VBScript]
Property YErrorBarTShaped As Boolean (read/write)
Description
Sets or returns the shape of the Y ErrorBar.
When YErrorBarTShaped is set to True, the Y error bar will be T shaped. When YErrorBarTShaped is set to False,
the Y error bar will be a line. YErrorBarTShaped is True by default.
Example
[VBScript]
'--- Create an instance of ExcelWriter and
'--- add a scatter chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsScatterChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- YErrorBarTShaped is true by default
Series.YErrorBarTShaped = False
Top |
YErrorBarValue
Syntax
[VBScript]
Property YErrorBarValue As Double
Description
Sets or returns the error value of a Y ErrorBar.
YErrorBarValue may be a percentage, a fixed value, a standard deviation, a standard error, or a custom value, depending
on the value of YErrorBarValueSource.
Example
[VBScript]
'--- Create an instance of ExcelWriter and
'--- add a column chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsColumnChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- Set YErrorBarValue to 15 percent
Series.YErrorBarValueSource = saxlsPercentage
Series.YErrorBarValue = 15
Top |
YErrorBarValueSource
Syntax
[VBScript]
Property YErrorBarValueSource As ASXErrorBarValueSource (read/write)
Description
Sets or returns the type of error value that the Y ErrorBar
will display. YErrorBarValueSource may be any of the following values:
| saxlsPercentage | 1 | A percentage of each data point |
| saxlsFixedValue | 2 | A fixed value for all data points |
| saxlsStandardDeviation | 3 | A standard deviation from the series mean |
| saxlsCustom | 4 | A custom value |
| saxlsStandardError | 5 | The standard error of the data series |
To assign a custom value, set
YErrorBarCustomMinusValues and/or
YErrorBarCustomPlusValues. To assign values to all other error types,
set YErrorBarValue.
Example
[VBScript]
'--- Create an instance of ExcelWriter and
'--- add a column chart to worksheet #1
Dim XlwApp, WrkSht, MyChart, Series
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsColumnChart, _
0, 1, 1, 10, 10)
'--- Add a series to the series collection
Set Series = MyChart.SeriesCollection.Add("D2:E5", , 0)
MyChart.SeriesCollection.CategoryData = "{Monday, Tuesday}"
'--- Set YErrorBarValue to 15 percent
Series.YErrorBarValueSource = saxlsPercentage
Series.YErrorBarValue = 15
Top |

Copyright 2006 © SoftArtisans, Inc. All Rights Reserved.
|