|
|
|
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")
| Series Properties |
Series Methods |
|
- The Series object has no methods.
|
| Series Methods and Properties |
| Area |
Returns an Area object, representing the area of a data series.
The properties of Area are AreaFormatting,
BackgroundColor, ForegroundColor,
and Pattern.
[VBScript]
Property Area As SAArea (read-only)
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 V5 |
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 |
Returns a Line object, representing the border of a data series.
The properties of Border are LineColor, LineFormatting,
LineStyle, and LineWeight.
The following demonstrates setting the color of a data series border to red.
[VBScript]
Property Border As SALine (read/write)
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 V5 |
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 V5 |
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 |
| ErrorBar |
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 |
The following will display a plus Y error bar.
[VBScript]
Property ErrorBar As ASXErrorBarType (read/write)
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 |
Returns a Line object, representing the appearance of an
ErrorBar.
The properties of ErrorBarLine are LineColor,
LineFormatting, LineStyle,
and LineWeight.
[VBScript]
Property ErrorBarLine As SALine (read-only)
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 |
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.
The following demonstrates enabling HasSmoothedLine.
[VBScript]
Property HasSmoothedLine As Boolean (read/write)
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 |
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.
[VBScript]
Property LabelFrame As IChartFrame (read-only)
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 |
When set to True,
the series will include labels displaying actual Y values. LabelShowActualValue is False by default.
To set LabelShowActualValue to True, use,
[VBScript]
Property LabeLShowActualValue As Boolean (read/write)
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 |
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. To set LabelShowCategoryAndValueAsPercent to True, use,
[VBScript]
Property LabelShowCategoryAndValueAsPercent As Boolean (read/write)
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 |
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.
[VBScript]
Property LabelShowCategoryLabel As Boolean (read/write)
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 |
When set to True, the series will include labels displaying
Y values as percents. LabelShowValueAsPercent is False by default. To enable LabelShowValueAsPercent, use,
[VBScript]
Property LabelShowValueAsPercent As Boolean (read/write)
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 |
Returns an Area object,
representing the data markers of a line,
radar, or scatter series.
The properties of MarkerFormat are,
AreaFormatting,
BackgroundColor,
ForegroundColor, and
Pattern.
The following example demonstrates setting the MarkerFormat's ForegroundColor.
[VBScript]
Property MarkerFormat As SAArea (read-only)
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}"
'--- 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 |
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.
[VBScript]
Property MarkerSize As Long (read/write)
Top |
| MarkerType |
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.
| NoMarker | 0 |
| Square | 1 |
| Diamond | 2 |
| Triangle | 3 |
| X | 4 |
| Star | 5 |
| DowJones | 6 |
| StandardDeviation | 7 |
| Circle | 8 |
| PlusSign | 9 |
[VBScript]
Property MarkerType As ASXMarkerType (read/write)
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}"
'--- Set the type of data marker to triangle
Series.MarkerType = 3
Top |
| Name |
Sets or retrieves the name of a single series. The following example demonstrates assigning
a name to a series.
[VBScript]
Property Name As String (read/write)
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 |
Sets or retrieves the range of cells containing the values of a
scatter chart data series.
The following demonstrates assigning the values in cells c1:c3 to the first series in a scatter chart.
[VBScript]
Property ScatterValues As String (read/write)
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 |
| SpaceBetweenBars V5 |
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 V5 |
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 |
Sets or retrieves the range of cells from which to plot a
data series.
The following demonstrates assigning the values in cells c1:c3 to the first series in a chart.
[VBScript]
Property Values As String (read/write)
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 |
| XErrorBarCustomMinusValues |
Sets or returns a custom minus error value for the X
ErrorBar. To assign XErrorBarCustomMinusValues, set
XErrorBarValueSource to 4 (saxlsCustom).
The following will display an X error bar of 5 units in the minus direction.
[VBScript]
Property XErrorBarCustomMinusValues As String (read/write)
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 |
Sets or returns a custom plus error value for the X
ErrorBar. To assign XErrorBarCustomPlusValues, set
XErrorBarValueSource to 4 (saxlsCustom).
The following will display an X error bar of 5 units in the plus direction.
[VBScript]
Property XErrorBarCustomPlusValues As String (read/write)
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 |
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.
The following will display a line shaped X error bar.
[VBScript]
Property XErrorBarTShaped As Boolean (read/write)
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 |
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.
The following sets the X error value to 15%.
[VBScript]
Property XErrorBarValue As Double (read/write)
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 |
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.
[VBScript]
Property XErrorBarValueSource As ASXErrorBarValueSource(read/write)
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 |
Sets or returns a custom minus error value for the Y
ErrorBar. To assign YErrorBarCustomMinusValues, set
YErrorBarValueSource to 4 (saxlsCustom).
The following will display a Y error bar of 5 units in the minus direction.
[VBScript]
Property YErrorBarCustomMinusValues As String (read/write)
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 |
Sets or returns a custom plus error value for the Y
ErrorBar. To assign YErrorBarCustomPlusValues, set
YErrorBarValueSource to 4 (saxlsCustom).
The following will display a Y error bar of 5 units in the plus direction.
[VBScript]
Property YErrorBarCustomPlusValues As String (read/write)
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 |
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.
The following will display a line shaped Y error bar.
[VBScript]
Property YErrorBarTShaped As Boolean (read/write)
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 |
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.
The following sets the Y error value to 15%.
[VBScript]
Property YErrorBarValue As Double
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 |
Sets or returns the type of error value that the Y
ErrorBar will display. YErrorBarValueSource 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
YErrorBarCustomMinusValues and/or
YErrorBarCustomPlusValues. To assign values to all other error types,
set YErrorBarValue.
The following will display a fixed error of 5 for all data points in the series.
[VBScript]
Property YErrorBarValueSource As ASXErrorBarValueSource (read/write)
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 © 2005, SoftArtisans, Inc.
|
|