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

void object->SetAxisCrossValue( int axis_number, cross_value )

Arguments

object
Required. A Chart object.
axis_number
Required. An integer value that specifies the axis (see table below).
cross_value
Required. 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:

Code Definition
0
Horizontal Axis
1
Vertical Axis
2
Secondary Horizontal Axis
3
Secondary Vertical Axis

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

PHP Sample Code

The following PHP code illustrates use of the SetAxisCrossValue method in a PHP page.

// 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( 0, "12/2006" );
$chart->SetAxisMaxValue( 0, "07/2008" );

// Set the min-max displayed values of the Y axis
$chart->SetAxisMinValue( 1, 110 );
$chart->SetAxisMaxValue( 1, 200 );

// X axis and Y axis cross at (05/2007,110)
$chart->SetAxisCrossValue( 0, "05/2007" );
$chart->SetAxisCrossValue( 1, 110 );

$chart->ExportAsResponse();

See Also

SetAxisMinValue Method | SetAxisMaxValue Method | ResetAxisBounds Method

Applies To: Chart Object