ISeriesTextSource.AddField
ISeriesTextSource

function AddField(Const AName: WideString; AIndex: Integer): ISeriesTextField;

Type Library
TeeChartx

Description
Use AddField to add a field a the text source file. The Field name should coincide with the name used to define the value in the Series ValueList. The name of the column is not important in the text file of origin but note that the index of the first column starts at 1.

Example [Visual Basic]:

Data text file "C:\TestFiles\web.txt"

Date,Open,High,Low,Close

1/1/2000,15,76,7,40

2/1/2000,40,55,35,37

3/1/2000,37,61,29,43

Private Sub Command1_Click()

With TChart1

.RemoveAllSeries

.AddSeries scCandle

End With

With SeriesTextSource1

.Series = TChart1.Series(0)

.FileName = "C:\TestFiles\web.txt"

.HeaderLines = 1

.AddField "Date", 1

.AddField "Open", 2

.AddField "High", 3

.AddField "Low", 4

.AddField "Close", 5

.Active = True

End With

End Sub