Specifies the title of a given axis.
object.SetAxisTitle axis_number, title
By default, none of the axis of a new chart has title.
The axis is defined by an integer value (the axis_number parameter) which is interpreted as follows:
Code | Definition |
---|---|
0 |
Horizontal Axis |
1 |
Vertical Axis |
2 |
Secondary Horizontal Axis |
3 |
Secondary Vertical Axis |
The following VBScript code illustrates use of the SetAxisTitle method.
'Create the chart series Dim categories(2) Dim values(2) categories(0) = "Jan" categories(1) = "Feb" categories(2) = "Mar" values(0) = 10 values(1) = 20 values(2) = 30 chart.SetCategoriesFromArray categories chart.SetSeriesValuesFromArray 0, values 'Set the chart title chart.SetTitle "My Chart" 'Set the horizontal axis title chart.SetAxisTitle 0, "Months" 'Set the vertical axis title chart.SetAxisTitle 1, "Values in million" 'Set the graphics settings from a style file chart.LoadStyle "C:\myStyle.scs" 'The chart is complete, we can now generate the movie chart.ExportAsResponse
Applies To: Chart Object