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.
Text file data source for tFastLineSeries
-
- Newbie
- Posts: 58
- Joined: Fri Nov 15, 2002 12:00 am
- Location: Naples, FL
- Contact:
-
- Newbie
- Posts: 58
- Joined: Fri Nov 15, 2002 12:00 am
- Location: Naples, FL
- Contact:
Re: Text file data source for tFastLineSeries
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?
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?
Re: Text file data source for tFastLineSeries
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.
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,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Text file data source for tFastLineSeries
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.
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,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 58
- Joined: Fri Nov 15, 2002 12:00 am
- Location: Naples, FL
- Contact:
Re: Text file data source for tFastLineSeries
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.
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 499 times
-
- Newbie
- Posts: 58
- Joined: Fri Nov 15, 2002 12:00 am
- Location: Naples, FL
- Contact:
Re: Text file data source for tFastLineSeries
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.
-
- Newbie
- Posts: 58
- Joined: Fri Nov 15, 2002 12:00 am
- Location: Naples, FL
- Contact:
Re: Text file data source for tFastLineSeries
Hello Yeray,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).
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 (31.4 KiB) Viewed 10459 times
Re: Text file data source for tFastLineSeries
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
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,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |