Loading own data file into TChart
Loading own data file into TChart
I have a data file with 5 columns and many entries.
I wish to load it into my TChart.
Is there a way of loading this file at once specifying which two columns to use.
I intend using the TPointSeries.
Thanks.
I wish to load it into my TChart.
Is there a way of loading this file at once specifying which two columns to use.
I intend using the TPointSeries.
Thanks.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi bamboo,
Yes, this is possible. You can import data from a file as described in Tutorial 12 - Exporting and Importing Charts. You'll also find an example at All Features\Welcome!\Components\Text Source in the new features demo.
Tutorials and demo can be found at TeeChart's program group.
Yes, this is possible. You can import data from a file as described in Tutorial 12 - Exporting and Importing Charts. You'll also find an example at All Features\Welcome!\Components\Text Source in the new features demo.
Tutorials and demo can be found at TeeChart's program group.
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 bamboo,
You can try using tab as FieldSeparator instead of blank space. You could also separate fields in the data file for comma (',') or semicolon (';').
You can try using tab as FieldSeparator instead of blank space. You could also separate fields in the data file for comma (',') or semicolon (';').
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 bamboo,
Try setting tab as field separator:
Try setting tab as field separator:
Code: Select all
SeriesTextSource1.FieldSeparator := #9;
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 bamboo,
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
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 bamboo,
Thanks for the file, we could reproduce the issue here. The only solutions we can think are:
1. Modify the data file or a temporary copy of it, replacing all what spaces for a single white space, comma or semicolon. That way data loads fine.
2. Manually parse each text line to extract the data to be populated to a series.
Thanks for the file, we could reproduce the issue here. The only solutions we can think are:
1. Modify the data file or a temporary copy of it, replacing all what spaces for a single white space, comma or semicolon. That way data loads fine.
2. Manually parse each text line to extract the data to be populated to a 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 |
Thank you very much. That is what I have done.
I was hoping to use the file as is.
It also seems that I have to create multiple instances of the TSeriesTextSource to plot multiple series from the same data file. I was hoping to use only the one TSeriesTextSource which I placed on the form. I never know how many graphs the user wishes to display from the data file.
Please advise.
Thank you.
I was hoping to use the file as is.
It also seems that I have to create multiple instances of the TSeriesTextSource to plot multiple series from the same data file. I was hoping to use only the one TSeriesTextSource which I placed on the form. I never know how many graphs the user wishes to display from the data file.
Please advise.
Thank you.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi bamboo,
You can use one single text source and change its properties at runtime as shown on the example here.
You can use one single text source and change its properties at runtime as shown on the example here.
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 |