import text data problem

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
windmaomao
Newbie
Newbie
Posts: 27
Joined: Sat Dec 06, 2003 5:00 am
Location: baltimore

import text data problem

Post by windmaomao » Sun Oct 10, 2004 4:08 pm

Hi,
I tried to import a text data file following the article "Importing text data from Dat or Txt file". But it doesn't work. The text file is
0.1 24
0.5 143
0.2 321
0.1 100

After I import it, it gives me 4 zeros for x=0,1,2,3. I tried lineseries and point3Dseries. Help

Fang

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Mon Oct 11, 2004 8:03 am

Hi.

Which TeeChart version are you using ? For point series it should work fine, providing you connect first column to x values and second column to y values (see TeeChart demo how exactly it's done). How did you define the column separator ?

For point3D series you need three columns, namely x,y and z.
Marjan Slatinek,
http://www.steema.com

windmaomao
Newbie
Newbie
Posts: 27
Joined: Sat Dec 06, 2003 5:00 am
Location: baltimore

Post by windmaomao » Mon Oct 11, 2004 5:40 pm

I tried 3 colume,

I am using 6.0pro, just placed order for v7.

could you tell me where is the demo? I checked the demo feature exe, but couldn't find where it's. Thanks.

Fang

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Tue Oct 12, 2004 11:30 am

Hi.
could you tell me where is the demo?
The Tee7New.exe, included with binaries installer. Check the "All Features -> Components -> Text source" example. The example is for bar series, but very similar code can be used with other series types as well.
Marjan Slatinek,
http://www.steema.com

windmaomao
Newbie
Newbie
Posts: 27
Joined: Sat Dec 06, 2003 5:00 am
Location: baltimore

Post by windmaomao » Wed Oct 13, 2004 10:36 pm

Thanks.

I'll try the code. But at runtime, in the charteditor, if I click series->data source->text file, and select the text file and parameters and press apply, it never works (v6,v7 without source code)

Fang
Best regards

Pep
Site Admin
Site Admin
Posts: 3298
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Oct 14, 2004 3:27 pm

Hi,

I've just test it here and works fine. To import the values of your first post (at design time) you only must add the Series (point series for example) go to the DataSource tab, select Text File, set Separator as "Space", Num. of Header File = 0, Text Column field = empty, X field = 1, Y Field = 2, and click "Apply".

Post Reply