Namespace: GlobFX.SwiffChartGenerator
Assembly: GlobFX.SwiffChartGenerator (in GlobFX.SwiffChartGenerator.dll)

Retrieves the title of a given axis.

Visual Basic

    Public Function GetAxisTitle( axis As AxisType ) As String

C#

    public string GetAxisTitle( AxisType axis );

#### Arguments

axis
  An AxisType enum 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.

#### Remarks

The axis is defined by an AxisType enum value (the axis parameter) which is interpreted as follows:

Enum Value | Definition
--- | ---
AxisType.Horizontal

Horizontal Axis
AxisType.Vertical Vertical Axis
AxisType.HorizontalSecondary Secondary Horizontal Axis
AxisType.VerticalSecondary Secondary Vertical Axis

#### Sample Code

The following code illustrates use of the GetAxisTitle method.

Visual Basic

    chart.SetDataFromTxtFile("C:\\myData.txt")

    ' We want a title for the horizontal axis (add one if it is not yet available)
    Dim htitle As String = chart.GetAxisTitle( AxisType.Horizontal )

    If String.IsNullOrEmpty(htitle) Then
      chart.SetAxisTitle( AxisType.Horizontal, "my horizontal axis title" )
    End If

C#

    chart.SetDataFromTxtFile("C:\\myData.txt");

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

    if( String.IsNullOrEmpty(htitle) )
      chart.SetAxisTitle( AxisType.Horizontal, "my horizontal axis title" );

#### See Also

SetAxisTitle Method

Applies To: Chart Object