Microsoft Office Tutorials and References
In Depth Information
21.6.3 CategoryNames Property
xlThin = 2
xlThick = 4
End Enum
To further illustrate axis-title formatting, here is the relevant code from the CreateChart procedure:
' Axis formatting
With co.Chart.Axes(xlCategory)
.HasTitle = True
.AxisTitle.Caption = "Types"
.AxisTitle.Border.Weight = xlMedium
End With
With co.Chart.Axes(xlValue)
.HasTitle = True
With .AxisTitle
.Caption = "Quantity for 1999"
.Font.Size = 6
.Orientation = xlHorizontal
.Characters(14, 4).Font.Italic = True
.Border.Weight = xlMedium
End With
End With
21.6.3 CategoryNames Property
This property returns or sets the category names for the axis. It can be set to either an array or a
Range object that contains the category names.
For instance, the code:
ActiveChart.Axes(xlCategory, xlSecondary). _
CategoryNames = Array("One", "Two", "Three", "Four", "Five", "Six")
changes the labels on the upper horizontal axis to "One", "Two", "Three", etc.
21.6.4 CategoryType Property and BaseUnit Property
The CategoryType property returns or sets the type for a category axis. (It applies only to
category-type axes.) It can be one of the following XlCategoryType constants:
Enum XlCategoryType
xlAutomaticScale = -4105
xlCategoryScale = 2
xlTimeScale = 3
End Enum
The default is xlAutomaticScale .
When the CategoryType property for the axis is set to xlTimeScale , the BaseUnit property
returns or sets the base unit for the specified category axis. It can be one of the following
XlTimeUnit constants:
Enum XlTimeUnit
xlDays = 0
xlMonths = 1
Search JabSto ::




Custom Search