Text file data source for tFastLineSeries

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Hans Wolfgang
Newbie
Newbie
Posts: 58
Joined: Fri Nov 15, 2002 12:00 am
Location: Naples, FL
Contact:

Text file data source for tFastLineSeries

Post by Hans Wolfgang » Sat Oct 24, 2009 7:03 pm

My tChart has a tFastLineSeries connected to tSeriesTextSource. At design time values from the default text file, tab-delimited, are displayed in the chart, just fine.

At runtime the user clicks a button to go to a form with all the drive/directory/file navigation and search controls, and another button which sets the filename property of tSeriesTextSource. Problem is, if I navigate away from the default text file and try another text file, no graph is plotted. If I then re-select the first file, the chart remains blank. Somehow the data points are not being repopulated. tSeriesTextSource.Active is set to true. tFastLineSeries.DataSource is set to the tseriesTextSource.

In the tSeriesTextSource property editor the field separator input has a bold vertical line. Is that the tab or the space? I removed it and typed "tab". This caused a runtime error saying that (x value) (long space) (y value) was not a valid floating point number. I went back to the chart editor at design time and found the data source field separator blank and reslected "Tab". The vertical line returned in the property editor.

Repeated steps in 2nd para. above and still do not have a graph in the chart.

Any ideas appreciated.

Hans Wolfgang
Newbie
Newbie
Posts: 58
Joined: Fri Nov 15, 2002 12:00 am
Location: Naples, FL
Contact:

Re: Text file data source for tFastLineSeries

Post by Hans Wolfgang » Sat Oct 24, 2009 8:14 pm

Reading further in http://www.steema.com/support/teechart/ ... /index.htm, it appears that properties set at design time need to be set again at runtime. Would you please confirm. Or is this just to make sure properties have not been changed in prior use of the program?

Also, the field separator is must be a tab in my case (simpler import pasting from Excel to text file). How does this get into the .pas source code? My method would be to enter the ascii code (009)l with Alt key depressed. Is this OK?

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Text file data source for tFastLineSeries

Post by Yeray » Mon Oct 26, 2009 9:43 am

Hi Hans,

I'm not sure to understand you.
Note that it is possible to import the data directly from a worksheet in an .XLS file. You can see an example into the steema.public.attachment newsgroups (18th November 2004).
Note that in the "Import Data From File" tutorial you mentioned, there is shown how to import data from a TSeriesTextSource both at design time and at runtime to show how to do the same in different ways. Of course doing it at runtime is more clear, powerful and customizable than at design time.
Also you could try calling series' CheckDataSource method after altering the datasource at runtime.

If these tips don't help you, please try to attach a simple example project we can run as-is to reproduce the problem here and we'll try to tell you if you are missing something or if there is a problem with the component.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Text file data source for tFastLineSeries

Post by Yeray » Mon Oct 26, 2009 10:10 am

Hi Hans,

Also, please take a look at this thread where using "tab" to delimit textsource is discussed and this other topic to see a complete simple example of how to use TextDatasource.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Hans Wolfgang
Newbie
Newbie
Posts: 58
Joined: Fri Nov 15, 2002 12:00 am
Location: Naples, FL
Contact:

Re: Text file data source for tFastLineSeries

Post by Hans Wolfgang » Mon Oct 26, 2009 1:42 pm

Thanks Yeray. I'm assuming that my text file with tabs is OK because data are successfully imported from the same file at design time. I'm attaching my project. There are other issues. I will open separate threads for those, later on.

Importing from Excel: will look at that later as well. If that works, will be awesome for my client.

WRT no graphs, that appears to be related to data file content and axis scale settings. Will be in touch further regarding this. Can you please keep track of the zip file attached here, in case of need.
Attachments
ENW-Arrhenius.zip
D6 project with tab-delimited text data files.
(19.51 KiB) Downloaded 498 times

Hans Wolfgang
Newbie
Newbie
Posts: 58
Joined: Fri Nov 15, 2002 12:00 am
Location: Naples, FL
Contact:

Re: Text file data source for tFastLineSeries

Post by Hans Wolfgang » Tue Oct 27, 2009 2:37 am

Solved the problem of the "disappearing graph". It was caused by the fixed limits of axes. The new data were just out of range. Thanks for your help.

Hans Wolfgang
Newbie
Newbie
Posts: 58
Joined: Fri Nov 15, 2002 12:00 am
Location: Naples, FL
Contact:

Re: Text file data source for tFastLineSeries

Post by Hans Wolfgang » Tue Oct 27, 2009 8:23 pm

Yeray wrote:Hi Hans,

Note that it is possible to import the data directly from a worksheet in an .XLS file. You can see an example into the steema.public.attachment newsgroups (18th November 2004).
Hello Yeray,

I looked in all the logical newsgroups (see attached) and could not find the Excel-related entry. Would be of great interest to me.
Attachments
Newsgroups.jpg
Newsgroups.jpg (31.4 KiB) Viewed 10455 times

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Text file data source for tFastLineSeries

Post by Yeray » Wed Oct 28, 2009 10:56 am

Hi Hans,

The mentioned example is at attachment newsgroups. There is no Excel entry because importation/exportation with XLS format is one of the multiple features in TeeChart. We consider that differencing between TeeChart versions is more important than between features.

Anyway, here it is the mentioned example
Attachments
ImportXYZExcel.zip
(36 KiB) Downloaded 540 times
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply