Saving Data to .tee file

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
superviper
Newbie
Newbie
Posts: 7
Joined: Tue Apr 18, 2017 12:00 am

Saving Data to .tee file

Post by superviper » Tue Apr 18, 2017 9:00 pm

I would like to save all chart data to .tee file in C++
I haven't problem to save for example to metafile like this

Code: Select all

SDIAppForm->Chart4->SaveToMetafile("c:\chart1.wmf") ;
but I cannot figure out how to save to .tee file.
It possible easy solution but I have read examples in toturials (12 chapter) and try go find solution for C++ in internet with no success.

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

Re: Saving Data to .tee file

Post by Yeray » Thu Apr 20, 2017 11:13 am

Hello,

You can save a chart to a tee file as follows:

Code: Select all

  SaveChartToFile(Chart1,"C:\\tmp\\teeFile.tee",True);
And you can load a tee file as follows:

Code: Select all

  LoadChartFromFile(Chart1, "C:\\tmp\\teeFile.tee");
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

superviper
Newbie
Newbie
Posts: 7
Joined: Tue Apr 18, 2017 12:00 am

Re: Saving Data to .tee file

Post by superviper » Thu Apr 20, 2017 3:55 pm

Thanks, I found that I wasn't able to use

Code: Select all

 SaveChartToFile (SDIAppForm->Chart4, "temppomiar.tee", False);
LoadChartFromFile(SDIAppForm->Chart4 , "temppomiar.tee");  

because of missing

Code: Select all

#include <VCLTee.Teestore.hpp>
Now I have other problem. Program save the file "temppomiar.tee" easly but loading this file to chart give me message
Error reading TLineSeries.CustomVertAxis: Argument out of range

This is how i build the series. Chart has 1 additional axis.

Code: Select all

SDIAppForm->Chart4->AddSeries (new TLineSeries (SDIAppForm->Chart4));

SDIAppForm->Chart4->AddSeries (new TLineSeries (SDIAppForm->Chart4));

SDIAppForm->Chart4->AddSeries (new TLineSeries (SDIAppForm->Chart4));

SDIAppForm->Chart4->AddSeries (new TLineSeries (SDIAppForm->Chart4));

 timeAxisChart4=new TChartAxis(SDIAppForm->Chart4);  
timeAxisChart4->PositionPercent=110; 
SDIAppForm->Chart4->Series[APMChart4Series]->CustomVertAxis=timeAxisChart4;
Could you help me with this problem?

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

Re: Saving Data to .tee file

Post by Yeray » Fri Apr 21, 2017 10:28 am

Hello,

It seems to work fine for me with v2017.21 here.
Project1_2017-04-21_12-27-33.png
Project1_2017-04-21_12-27-33.png (52.84 KiB) Viewed 10042 times
testCBuilderImport.zip
(85.97 KiB) Downloaded 835 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

superviper
Newbie
Newbie
Posts: 7
Joined: Tue Apr 18, 2017 12:00 am

Re: Saving Data to .tee file

Post by superviper » Sun Apr 23, 2017 8:28 pm

Thank you for support. I took me some time to make it working. The first problem was because I take me time to find out that I should include

Code: Select all

 #include <VCLTee.Teestore.hpp>
and the second was because I have put by mistake false option.

Code: Select all

SaveChartToFile (SDIAppForm->Chart4, "temppomiar.tee", False);


then I use

Code: Select all

SaveChartToFile (SDIAppForm->Chart4, "temppomiar.tee", True);
I'm return to programming after 12years. Before I vas programming Delphi. Now I have decide to program in C++ as I also do programming arduino so 1 language is more easy to handle. I notice that not to may examples is regarding Steema charts in C++. Thank you a lot for all persons involve with help with this subject. I hope it will be also nice sample for others beginners like I :)

Post Reply