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

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

Visual Basic
Public Sub ClearAll
C#
public void ClearAll(); 

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.

Code Sample

The following code illustrates use of the ClearAll method.

Visual Basic
' Delete all the series and categories of the chart
chart.ClearAll()

Dim n_series As Integer = chart.SeriesCount
Dim n_categories As Integer = chart.ValuesCount
Dim title As String = chart.Title
Dim subtitle As String = chart.Subtitle

' n_series and n_categories are both equal to 0
Me.Response.Write( "number of series=" + n_series + " number of categories=" + n_categories + "<br>" )

' title and subtitle are both empty strings
Me.Response.Write( " Title=" + title + " Subtitle=" + subtitle + "<br>" )
C#
// Delete all the series and categories of the chart
chart.ClearAll();

int n_series= chart.SeriesCount
int n_categories= chart.ValuesCount
string title= chart.Title
string subtitle= chart.Subtitle

// n_series and n_categories are both equal to 0
this.Response.Write( "number of series=" + n_series + " number of categories=" + n_categories + "<br>" );

// title and subtitle are both empty strings
this.Response.Write( " Title=" + title + " Subtitle=" + subtitle + "<br>" );

See Also

SeriesCount Property | SetSeriesValuesFromString Method | SetSeriesValuesFromArray Method | GetSeriesValue Method

Applies To: Chart Object