Delete every series and categories and reset all the parameters of a chart (including title, subtitle, etc.).

void object->ClearAll( ) 

Arguments

object
Required. A Chart object.

Remarks

The ClearAll method deletes all the series added to a chart, including XY series. The method also deletes the categories and resets all the parameters of a chart to their respective default value.

PHP Code Sample

The following PHP code illustrates use of the ClearAll method.

// Delete all the series and categories of the chart
$chart->ClearAll();

$n_series= $chart->GetSeriesCount();
$n_categories= $chart->GetValuesCount();
$title= $chart->GetTitle();
$subtitle= $chart->GetSubtitle();

// n_series and n_categories are both equal to 0
print( "number of series=" . $n_series . " number of categories=" . $n_categories );

'title and subtitle are both empty strings
print( " Title=" . $title . " Subtitle=" . $subtitle );

See Also

GetSeriesCount Method | SetSeriesValuesFromString Method | SetSeriesValuesFromArray Method | GetSeriesValue Method

Applies To: Chart Object