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

Specifies the highest value displayed from all data series as the highest data value on a given axis.

Visual Basic

    Public Sub SetAxisMaxValue( axis As AxisType, max_value As Object )

C#

    public void SetAxisMaxValue( AxisType axis, object max_value );

#### Arguments

axis
  An AxisType anum value that specifies the axis (see table below).
max_value
  A data value that specifies the highest value on the selected axis.

#### Remarks

The SetAxisMaxValue method specifies the highest value displayed from all data series as the highest data value on a given axis.

The axis is defined by an integer value 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 value type can be one of the following types: double, string, DateTime, int, float, decimal, byte, sbyte, short, ushort, uint, long, ulong.

Use the ResetAxisBounds method to let Swiff Chart Generator automatically determine the Axis Max value.

#### Sample Code

The following code illustrates use of the SetAxisMaxValue method.

Visual Basic

    ' Load the style file first!
    chart.LoadStyle( "C:\\myXYStyle.scs" )

    chart.SetSeriesXValuesFromString( 0, "02/2007;05/2007;12/2007" )
    chart.SetSeriesYValuesFromString( 0, "187.8;156.9;121.8" )

    ' Set the min-max displayed dates of the X axis
    chart.SetAxisMinValue( AxisType.Horizontal, "12/2006" )
    chart.SetAxisMaxValue( AxisType.Horizontal, "07/2008" )

    ' Set the min-max displayed values of the Y axis
    chart.SetAxisMinValue( AxisType.Vertical, 110 )
    chart.SetAxisMaxValue( AxisType.Vertical, 200 )

    ' X axis and Y axis cross at (05/2007,110)
    chart.SetAxisCrossValue( AxisType.Horizontal, "05/2007" )
    chart.SetAxisCrossValue( AxisType.Vertical, 110 )

C#

    // Load the style file first!
    chart.LoadStyle( "C:\\myXYStyle.scs" );

    chart.SetSeriesXValuesFromString( 0, "02/2007;05/2007;12/2007" );
    chart.SetSeriesYValuesFromString( 0, "187.8;156.9;121.8" );

    // Set the min-max displayed dates of the X axis
    chart.SetAxisMinValue( AxisType.Horizontal, "12/2006" );
    chart.SetAxisMaxValue( AxisType.Horizontal, "07/2008" );

    // Set the min-max displayed values of the Y axis
    chart.SetAxisMinValue( AxisType.Vertical, 110 );
    chart.SetAxisMaxValue( AxisType.Vertical, 200 );

    // X axis and Y axis cross at (05/2007,110)
    chart.SetAxisCrossValue( AxisType.Horizontal, "05/2007" );
    chart.SetAxisCrossValue( AxisType.Vertical, 110 );

#### See Also

SetAxisMinValue Method | SetAxisCrossValue Method | ResetAxisBounds Method

Applies To: Chart Object