Hello,
We are in the midst of upgrading TeeChart Pro from 5.03 to 2012, and have noticed some odd behaviour when loading v5.03 .tee files in the 2012 TChart component.
Certain of our charts are produced by creating data on a non DB-aware chart, before persisting the chart using SaveChartToFile. The .tee files produced by doing this can be stored on the database in a set of 'messaging' tables.
To test backward compatibility, we load .tee files produced by v5.03 (the legacy version) into the 2012 TChart component using LoadChartFromFile. This works to a certain extent, but loses all data that was persisted in the .tee file.
Out of interest, I loaded a .tee produced in v2012 into a v5.03 TChart, and it worked!?
Is there any way that .tee files produced by TeeChart 5.03 can be reliably rendered in TeeChart v2012?
Regards,
Jan
Backward compatibility between 2012 and 5.03.
-
- Newbie
- Posts: 1
- Joined: Tue Nov 20, 2012 12:00 am
Re: Backward compatibility between 2012 and 5.03.
Hi Jan,
Could you please send us a tee file for testing purposes? Of course I mean a tee file generated with v5.03 that doesn't load the data for you with the latest version.
Right now, I'm not sure if v5 had the option to save the tee file "as text", but it would be easier to explore. Ie:
Also note we don't need a huge tee file with millions of points. You can probably reduce the size of if removing some points before exporting to the tee file.
Thanks in advance.
Could you please send us a tee file for testing purposes? Of course I mean a tee file generated with v5.03 that doesn't load the data for you with the latest version.
Right now, I'm not sure if v5 had the option to save the tee file "as text", but it would be easier to explore. Ie:
Code: Select all
SaveChartToFile(Chart1, 'C:\tmp\test.tee', true, true);
Thanks in advance.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 1
- Joined: Wed Oct 31, 2012 12:00 am
Re: Backward compatibility between 2012 and 5.03.
Sorry about the delay.
Here is a very simple pie chart file with only a few data points. This loads correctly into a v5.03 TChart but not in v9.
Apologies, but SaveChartToFile does not appear to have the overload you specified in v5.03
Here is a very simple pie chart file with only a few data points. This loads correctly into a v5.03 TChart but not in v9.
Apologies, but SaveChartToFile does not appear to have the overload you specified in v5.03
- Attachments
-
- EmployeesChart_TC5.zip
- v5.03 chart file.
- (767 Bytes) Downloaded 311 times
Re: Backward compatibility between 2012 and 5.03.
Hi,
I see. In TeeChart v8, there was a change in the LoadChartFromStreamCheck: it's last parameter, TryReadData:boolean, passed from default=true to default=false. This makes the LoadChartFromFile function not to check the Data. We'll revise it.
In the meanwhile, you can directly call LoadChartFromStreamCheck passing the TryReadData=true. This works fine for me here:
I see. In TeeChart v8, there was a change in the LoadChartFromStreamCheck: it's last parameter, TryReadData:boolean, passed from default=true to default=false. This makes the LoadChartFromFile function not to check the Data. We'll revise it.
In the meanwhile, you can directly call LoadChartFromStreamCheck passing the TryReadData=true. This works fine for me here:
Code: Select all
var Chart1: TChart;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1:=TChart.Create(Self);
Chart1.Parent:=Self;
LoadChart(Chart1, 'C:\tmp\EmployeesChart_TC5.tee');
end;
procedure TForm1.LoadChart(AChart: TChart; AName: string);
var tmpChart: TCustomChart;
tmp : TFileStream;
begin
RegisterTeeStandardSeries;
AChart.Free;
tmpChart:=TChart.Create(Self);
tmp:=TFileStream.Create(TeeCheckExtension(AName),fmOpenRead or fmShareDenyWrite);
try
LoadChartFromStreamCheck(tmpChart,tmp,nil,true);
finally
tmp.Free;
end;
AChart:=tmpChart as TChart;
AChart.Parent:=Self;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |