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 ChartFrame Object (IChartFrame)

ChartArea, DataTable, Legend, LabelFrame, PlotArea, and Title are ChartFrame objects.

ChartFrame Methods and Properties

ChartFrame Methods and Properties
Area

Returns an Area object, representing the area of the ChartFrame object (ChartArea, Legend, LabelFrame, PlotArea, or Title). The properties of Area are AreaFormatting, BackgroundColor, ForegroundColor, and Pattern.

The following sets the pattern of a ChartArea object to Trellis.

Chart.ChartArea.Area.Pattern = 10
		

Top

Border

Returns a Line object, representing the border of the ChartFrame object (ChartArea, Legend, LabelFrame, PlotArea, or Title). The properties of Area are LineColor, LineFormatting, LineStyle, and LineWeight.

The following sets a ChartArea object's border color to red.

Chart.ChartArea.Border.LineColor = rgb(255,0,0)
		

Top

HasShadow

When HasShadow is set to True, the ChartFrame object will have a shadow effect. HasShadow is set to False by default.

The following will display the chart legend with a shadow effect.

chart.legend.hasshadow = true
		

Top

Height

Height has two definitions: one for ChartArea, and another for all other ChartFrame objects.

  • For ChartArea: Specifies the ChartArea's vertical offset from its lower right corner row. If the value of Height is negative, the ChartArea's bottom border will be offset upward. If the value of Height is positive, the ChartArea's bottom border will be offset downward. The following example will display the ChartArea offset upward of its bottom row.
    chart.chartarea.height = -200
    		
  • For all other ChartFrame objects: Height is the x coordinate of the lower left corner of the ChartFrame, in units of 1/4000 of the ChartArea.

Note: LegendLocation and the pair of Chartframe properties Height and Width are mutually exclusive. Use either LegendLocation or Height and Width.

Top

Number

LabelFrame property. Sets the display format of label numbers. For a complete list of Number codes, see Formatting Codes. The following example demonstrates assigning the percentage format to a LabelFrame.

seriescollection(1).labelframe.number = 9
		

Top

Text

Sets or returns the text of a Title ChartFrame object. Text is a title's default property, so you can assign the title text by either of the following methods.

'--- Assign a title using the text property
chart.title.text = "Chart Title"
		
'--- Assign a title without using the text property
chart.title="Chart Title"
		

Top

TextFont

Sets or returns a Font object representing a ChartFrame's font. The properties of TextFont are, Bold, Charset, Color, Italic, Name, QueryFontDisp, Size, Strikethrough, Subscript, Superscript, Underline, and Weight.

The following will set the legend's font to Tahoma.

chart.legend.textfont.name = "Tahoma"
		

Top

TextHorizontalAlignment

Sets or returns the horizontal alignment of text in a ChartFrame. The values of TextHorizontalAlignment are,

saxlsTop1
saxlsCenter2
saxlsBottom3
saxlsJustify4

The following will display the legend text horizontally centered.

chart.legend.TextHorizontalAlignment = 2
		

Top

TextRotationAngle

Sets or returns the rotation angle of text in a ChartFrame.

The following will rotate the chart's title text 45 degrees counterclockwise.

chart.title.TextRotationAngle = 45
		

Top

TextVerticalAlignment

Sets or returns the vertical alignment of text in a ChartFrame. The values of TextVerticalAlignment are,

saxlsTop1
saxlsCenter2
saxlsBottom3
saxlsJustify4

The following will display the legend text vertically centered.

chart.legend.TextVerticalAlignment = 2
		

Top

Width

Width has two definitions: one for ChartArea, and another for all other ChartFrame objects.

  • For ChartArea: Specifies the ChartArea's horizontal offset from its lower right corner column. If the value of Width is negative, the ChartArea's right border will be offset to the left. If the value of Width is positive, the ChartArea's right border will be offset to the right. The following example will display the ChartArea offset to the right of its right-border column.
    chart.chartarea.width = 200
    		
  • For all other ChartFrame objects: Width is the y coordinate of the lower left corner of the ChartFrame, in units of 1/4000 of the ChartArea.

Note: LegendLocation and the pair of Chartframe properties Height and Width are mutually exclusive. Use either LegendLocation or Height and Width.

Top

X

X has two definitions: one for ChartArea, and another for all other ChartFrame objects.

  • For ChartArea: Specifies the ChartArea's horizontal offset from its upper left corner column. If the value of X is negative, the ChartArea's left border will be offset to the left. If the value of X is positive, the ChartArea's left border will be offset to the right. The following example will display the ChartArea offset to the right of its left-border column.
    chart.chartarea.x = 200
    		
  • For all other ChartFrame objects: X is the x coordinate of the upper right corner of the ChartFrame, in units of 1/4000 of the ChartArea.

Note: X is not a property of Legend.

Top

Y

Y has two definitions: one for ChartArea, and another for all other ChartFrame objects.

  • For ChartArea: Specifies the ChartArea's vertical offset from its upper left corner row. If the value of Y is negative, the ChartArea's top border will be offset upward. If the value of Y is positive, the ChartArea's top border will be offset downward. The following example will display the ChartArea offset downward of its upper row.
    chart.chartarea.Y = 200
    		
  • For all other ChartFrame objects: Y is the y coordinate of the upper right corner of the ChartFrame, in units of 1/4000 of the ChartArea.

Note: Y is not a property of Legend.

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.