Dear all
I'm having trouble importing data from text file. I am aware there is a tutorial on how to import ONE series from file (http://www.teechart.net/reference/modul ... cle&sid=10) but I cannot figure out how to import MULTIPLE series from a SINGLE flat file.
Would anyone have an idea or even better a sample code on how to accomplish that ?
A related problem (I probably will have to issue another thread, but I mention it here anyway as it is closely related) is how to import data not from text but from a binary file.
An example is given in the demo "BigFlatFile.exe" - but again, this is designed for only one and not multiple series.
Every help is highly appreciated.
Importing text data - many series
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi dr. vodca,
You can populate multiple series from a single text file provided you set different file columns for each series Y values.I'm having trouble importing data from text file. I am aware there is a tutorial on how to import ONE series from file (http://www.teechart.net/reference/modul ... cle&sid=10) but I cannot figure out how to import MULTIPLE series from a SINGLE flat file.
Would anyone have an idea or even better a sample code on how to accomplish that ?
The same would apply as in the previous question.A related problem (I probably will have to issue another thread, but I mention it here anyway as it is closely related) is how to import data not from text but from a binary file.
An example is given in the demo "BigFlatFile.exe" - but again, this is designed for only one and not multiple series.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi stefano,
Yes, you can do something like this:
Yes, you can do something like this:
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
begin
With SeriesTextSource1 do
begin
HeaderLines:=0;
FieldSeparator:=',';
Fields.Clear;
AddField('X',1);
AddField('Bar',2);
AddField('Text',4);
Series:=Series1;
LoadFromFile('c:\temp\test.txt');
end;
With SeriesTextSource2 do
begin
HeaderLines:=0;
FieldSeparator:=',';
Fields.Clear;
AddField('X',1);
AddField('Bar',3);
AddField('Text',4);
Series:=Series2;
LoadFromFile('c:\temp\test.txt');
end;
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |