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

Specifies the title of a given axis.

Visual Basic

    Public Sub SetAxisTitle( axis As AxisType, title As String )

C#

    public SetAxisTitle( AxisType axis, string title );

#### Arguments

axis
  An AxisType anum value that specifies the axis (see table below).
title
  A string that specifies the title.

#### Remarks

By default, none of the axis of a new chart has title.

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 SetAxisTitle method.

Visual Basic

    ' Create the chart series
    Dim categories(2) As String;
    Dim values(2) As Integer;

    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.Title = "My Chart"

    ' Set the horizontal axis title
    chart.SetAxisTitle( AxisType.Horizontal, "Months" )

    ' Set the vertical axis title
    chart.SetAxisTitle( AxisType.Vertical, "Values in million" )

    ' Set the graphics settings from a style file
    chart.LoadStyle( "C:\\myStyle.scs" )

C#

    // Create the chart series
    string[] categories= new string[3];
    int[] values= new int[3];

    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.Title= "My Chart";

    // Set the horizontal axis title
    chart.SetAxisTitle( AxisType.Horizontal, "Months" );

    // Set the vertical axis title
    chart.SetAxisTitle( AxisType.Vertical, "Values in million" );

    // Set the graphics settings from a style file
    chart.LoadStyle( "C:\\myStyle.scs" );

#### See Also

GetAxisTitle Method

Applies To: Chart Object