Saving Data to .tee file

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.

Saving Data to .tee file

Postby 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.
superviper
Newbie
Newbie
 
Posts: 7
Joined: Tue Apr 18, 2017 12:00 am

Re: Saving Data to .tee file

Postby 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 ImagePlease read our Bug Fixing Policy
Yeray
Site Admin
Site Admin
 
Posts: 8188
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia

Re: Saving Data to .tee file

Postby 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?
superviper
Newbie
Newbie
 
Posts: 7
Joined: Tue Apr 18, 2017 12:00 am

Re: Saving Data to .tee file

Postby 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 375 times

testCBuilderImport.zip
(85.97 KiB) Downloaded 29 times
Best Regards,

ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image ImagePlease read our Bug Fixing Policy
Yeray
Site Admin
Site Admin
 
Posts: 8188
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia

Re: Saving Data to .tee file

Postby 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 :)
superviper
Newbie
Newbie
 
Posts: 7
Joined: Tue Apr 18, 2017 12:00 am


Return to VCL

Who is online

Users browsing this forum: No registered users and 6 guests