| 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,
| saxlsTop | 1 |
| saxlsCenter | 2 |
| saxlsBottom | 3 |
| saxlsJustify | 4 |
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,
| saxlsTop | 1 |
| saxlsCenter | 2 |
| saxlsBottom | 3 |
| saxlsJustify | 4 |
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.
- 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.
- 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 |