ISeries.FreeDatasource
ISeries

procedure FreeDatasource(SurePrompt: WordBool);

Type Library
TeeChartx

Description
When True, the FreeDatasource deletes the Dataset associated to the Series.

Example [Visual Basic]:

Private Sub Command1_Click()

TChart1.Series(0).FreeDatasource True

End Sub

Private Sub Command2_Click()

TChart1.ShowEditor

End Sub

Private Sub Form_Load()

' This example uses Microsoft OLE DB

' ActiveX Data Objects 2.0 Library.

' declare a Connection and RecordSet variables...

Dim Data As New ADODB.Connection

Dim Record As New ADODB.Recordset

' Open the sample table and database...

' The "TeeChart Pro Database" ODBC DSN is

' automatically added when installing TeeChart Pro...

Data.Open "TeeChart Pro Database"

Record.Open "employee", Data, 1, 1

' Retrieve records....

TChart1.AddSeries scBar

TChart1.Series(0).ColorEachPoint = True

TChart1.Series(0).Clear

TChart1.Series(0).DataSource = Record

TChart1.Series(0).YValues.ValueSource = Record.Fields(1).Name

TChart1.Series(0).LabelsSource = Record.Fields(0).Name

' release variables...

Set Record = Nothing

Set Data = Nothing

End Sub