Introduction
  Welcome
  The Web Reporting Solution
  What is ExcelWriter?
  Features and Benefits
  New in This Version  V4
  Requirements
  Edition Differences
  Frequently Asked Questions
  Troubleshooting

Quick Start
  Creating Your First Spreadsheet
  Adding a Formula
  Adding Formatting
  Importing from a Database

Features In Depth
  Addressing Cells
  Setting Values
  Output Options
  Adding Charts
  Reading an Existing Spreadsheet
  Modifying an Existing Spreadsheet
  The Range Object
  Template Spreadsheets
  How to Use Templates
  ExcelApp.Open vs. ExcelTemplate
  Using ExcelTemplate with PivotTables
  Templates and Charts
  Reliable Spreadsheet Download  V4
  Page Setup
  Formatting Headers & Footers
  Protecting your Worksheet
  Multilingual Support  V4
  XML Import

HotCell Technology  V4
  What is HotCell Technology?
  Upload Example
  Advanced POST Example
  Advanced Upload Example

Programmer's Reference
  Object Model
      ExcelTemplate Object
      ExcelApplication Object
         3DProperties Object
         Area Object
         Axis Object
         Cells Object
         Cell Object
         Charts Object
         Chart Object
         ChartFrame Object
         Font Object
         Line Object
         PageSetup Object
         Pictures Object
         Picture Object
         Range Object
         SeriesCollection Object
         Series Object
         Style Object
         Worksheets Object
         Worksheet Object
  Formula Functions
  Formula Calculation Operators
  Formatting Codes
  Chart Codes

Installation
  Quick Installation
  Configuring IIS
  Security Considerations

External Links
  ExcelWriter Home Page
  Technical Support
  ExcelWriter Demos
  SoftArtisans Home Page
  E-mail General Questions
  E-mail Technical Support
  Legal Information

Object Model ExcelApplication ExcelTemplate Worksheets Worksheet Cells Cell Range Style Font Charts
Chart SeriesCollection Series 3DProperties Axis ChartFrame Line Area Pictures Picture PageSetup


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 Methods and Properties

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.

The following demonstrates setting the foreground color of a data series area to red.

seriescollection(1).area.foregroundcolor = rgb(255,0,0)
		

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.

seriescollection(1).border.linecolor = rgb(255,0,0)
		

Note: To display a series border and its markers in one solid color, set all of the following properties to the desired color:

For example:

objSeries1.Border.LineColor = rgb(255,0,0)
objSeries1.MarkerFormat.BackgroundColor = rgb(255,0,0)
objSeries1.MarkerFormat.ForegroundColor = rgb(255,0,0)
	

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:

saxlsErrorBarNone0 (Default value)
saxlsXDirectionPlus1
saxlsXDirectionMinus2
saxlsYDirectionPlus4
saxlsYDirectionMinus8

The following will display a plus Y error bar.

SeriesCollection(1).ErrorBar = 4
		

Top

ErrorBarLine

Returns a Line object, representing the appearance of an ErrorBar. The properties of ErrorBarLine are LineColor, LineFormatting, LineStyle, and LineWeight.

The following will display a red error bar.

SeriesCollection(1).ErrorBarLine.Linecolor = rgb(255,0,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.

chart.seriescollection(1).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.

The following example demonstrates setting the LabelFrame ForegroundColor to red.

seriescollection(1).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,

seriescollection(1).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,

seriescollection(1).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. To set LabelShowCategoryLabel to True, use,

seriescollection(1).LabelShowCategoryLabel = true
		

Top

LabelShowValueAsPercent

Property of a Pie chart. When set to True, the series will include labels displaying Y values as percents. LabelShowValueAsPercent is False by default. To enable LabelShowValueAsPercent, use,

seriescollection(1).showvalueaspercent = 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.

seriescollection(1).MarkerFormat.foregroundcolor = rgb(255,0,0)
		

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
Square1
Diamond2
Triangle3
X4
Star5
DowJones6
StandardDeviation7
Circle8
PlusSign9

The following example demonstrates setting the marker type of seriesA to Star.

set seriesA = chart.seriescollection.add("a1:c1")
seriesA.markertype = 5
		

Top

Name

Sets or retrieves the name of a single series. The following example demonstrates assigning a name to a series.

set seriesA = chart.seriescollection.add("a1:c1")
seriesA.name = "Revenue"
		

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.

seriescollection(1).scattervalues = "c1:c3"
		

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.

seriescollection(1).values = "c1:c3"
		

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.

seriescollection(1).XErrorBarValueSource = 4
seriescollection(1).XErrorBarCustomMinusValues = 5
		

Note: Only Scatter charts will display X error bars.

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.

seriescollection(1).XErrorBarValueSource = 4
seriescollection(1).XErrorBarCustomPlusValues = 5
		

Note: Only Scatter charts will display X error bars.

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.

SeriesCollection(1).XErrorBarTShaped = False
		

Note: Only Scatter charts will display X error bars.

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%.

SeriesCollection(1).XErrorBarValueSource = 1  '--- Percentage
SeriesCollection(1).XErrorBarValue = 15
		

Note: Only Scatter charts will display X error bars.

Top

XErrorBarValueSource

Sets or returns the type of error value that the X ErrorBar will display. XErrorBarValueSource may be any of the following.

saxlsPercentage1A percentage of each data point
saxlsFixedValue2A fixed value for all data points
saxlsStandardDeviation3A standard deviation from the series mean
saxlsCustom4A custom value
saxlsStandardError5The 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.

The following will display a fixed error of 5 for all data points in the series.

SeriesCollection(1).XErrorBarValueSource = 2  '--- Fixed value 
SeriesCollection(1).XErrorBarValue = 5
		

Note: Only Scatter charts will display X error bars.

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.

seriescollection(1).YErrorBarValueSource = 4
seriescollection(1).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.

seriescollection(1).YErrorBarValueSource = 4
seriescollection(1).YErrorBarCustomPlusValues = 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.

SeriesCollection(1).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%.

SeriesCollection(1).YErrorBarValueSource = 1  '--- Percentage
SeriesCollection(1).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.

saxlsPercentage1A percentage of each data point
saxlsFixedValue2A fixed value for all data points
saxlsStandardDeviation3A standard deviation from the series mean
saxlsCustom4A custom value
saxlsStandardError5The 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.

SeriesCollection(1).YErrorBarValueSource = 2  '--- Fixed value 
SeriesCollection(1).YErrorBarValue = 5
		

Top



Object Model ExcelApplication ExcelTemplate Worksheets Worksheet Cells Cell Range Style Font Charts
Chart SeriesCollection Series 3DProperties Axis ChartFrame Line Area Pictures Picture PageSetup


Copyright © 2003, SoftArtisans, Inc.