Loading Data using TSeriesTextSource 8.04

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
timhamel
Newbie
Newbie
Posts: 34
Joined: Mon Dec 31, 2007 12:00 am

Loading Data using TSeriesTextSource 8.04

Post by timhamel » Fri Oct 23, 2009 12:18 pm

I am having problems importing values into my chart using a text source. I am using RAD 2007 C++ mode, TeeChart 8.04.

The actual chart is simple: X axis is TDateTime and Y is Temperature. I am using a text file which should populate the graph. Both axis are set to automatic. When the text file is generated, the TDateTime part is saved as a double from the VAL member of TDateTime. The file looks like this:

40108.749417 95.000000
40108.749429 95.000000
40108.749441 95.000000
40108.749452 95.000000
40108.749464 95.000000

The SeriesTextSource component used for the read in is set up as:

DecimalSeparator ='.';
SeriesTextSource1->Fields->Clear();
SeriesTextSource1->Series = Series1;
SeriesTextSource1->AddField("X",1);
SeriesTextSource1->AddField("Y",2);
SeriesTextSource1->FieldSeparator = " ";
SeriesTextSource1->HeaderLines = 0;
SeriesTextSource1->Series = Series1;
SeriesTextSource1->FileName = sFileName;
SeriesTextSource1->Active = true;

The problem is: the component throws an exception when reading in the date with the following:

Exception class= EConvertError
ExceptAddr= 0048170E
ExceptionMessage= '40108.749417' is not a valid date and time

What value is your component expecting?

Br, Tim

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

Re: Loading Data using TSeriesTextSource 8.04

Post by Yeray » Fri Oct 23, 2009 2:08 pm

Hi Tim,

Please see my reply at the other thread and please, don't open multiple topics with the same question.
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

timhamel
Newbie
Newbie
Posts: 34
Joined: Mon Dec 31, 2007 12:00 am

Re: Loading Data using TSeriesTextSource 8.04

Post by timhamel » Mon Oct 26, 2009 9:08 am

Thanks.

Sorry for having 2 cases open. I thought that for users having the same problem and looking for a solution, changing
the topic header would help. Will not create more work for you in the future.

Cheers,
Tim

Post Reply