Namespace: GlobFX.SwiffChartGenerator
Assembly: GlobFX.SwiffChartGenerator (in GlobFX.SwiffChartGenerator.dll)
Specifies the title of a given axis.
Public Sub SetAxisTitle( axis As AxisType, title As String )
public SetAxisTitle( AxisType axis, string title );
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 |
The following code illustrates use of the SetAxisTitle method.
' 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" )
// 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" );
Applies To: Chart Object