Inserts an Axis object on the object.
[ lInsertAxis = ] Object.InsertAxis ( vAxis )
The InsertAxis method syntax has the following parts:
Name |
Type |
Description |
Object |
AChart |
AChart control |
lInsertAxis |
Long |
Insert an axis to the object at a position specified by vAxis. If vAxis is not valid, then the axis is appended to the end of the list. The return value is the zero-based index of the axis on the chart. If an error occurs, the return value is -1, for example, there is insufficient space to store the new axis. |
vAxis |
Val Variant |
Either the name of the object or the zero-based index of the object in the array. |
If the name or the index of the Axes property is given, the axis will be inserted before the specified axis in the array. Otherwise, the axis will be appended to the end of the array.
The following example will insert an axis on the AChart before the first axis:
cht1.InsertAxis(0)
The following example will insert an axis on the AChart before the "Time" axis:
cht1.InsertAxis("Time")
The following example will append an axis on the AChart after the last axis:
cht1.InsertAxis()