Retrieves the title of a given axis.

object.GetAxisTitle( axis_number )

Arguments

object
Required. A Chart object.
axis_number
Required. An integer value that specifies the axis (see table below).

Return Value

The GetAxisTitle method returns a string value that contains the title of the axis specified by axis_number.

Remarks

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

JScript Sample Code

The following JScript code illustrates use of the GetAxisTitle method in an ASP page.

chart.SetSeparators( ";", true );
chart.SetDataFromQuery();

//We want a title for the horizontal axis (add one if it is not yet available) 
htitle= chart.GetAxisTitle( 0 );

if( htitle == "" )
  {
  chart.SetAxisTitle( 0, "my horizontal axis title" );
  }

chart.ExportAsResponse();

See Also

SetAxisTitle Method

Applies To: Chart Object