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

Specifies the cross value of a selected axis (the value at which the other axis crosses the selected axis).

Visual Basic

    Public Sub SetAxisCrossValue( axis As AxisType, cross_value As Object )

C#

    public void SetAxisCrossValue( AxisType axis, object cross_value );

#### Arguments

axis
  An AxisType anum value that specifies the axis (see table below).
cross_value
  A data value which specifies the cross value on the selected axis.

#### Remarks

The SetAxisCrossValue method specifies the value on the selected axis at which the other axis crosses the select axis.

The selected 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 Cross value.

#### Sample Code

The following code illustrates use of the SetAxisCrossValue 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 | SetAxisMaxValue Method | ResetAxisBounds Method

Applies To: Chart Object