tchart import : Wrong *.tee file format

TeeChart for ActiveX, COM and ASP

tchart import : Wrong *.tee file format

Postby sunxp » Fri Jan 12, 2018 9:22 am

Hello,

I want to export tchart config and then import config stream :

Code: Select all
   CExport export1 = (CExport)m_tchart.get_Export();
   VARIANT var = export1.SaveToXMLStream(TRUE, TRUE);

   CImport import1 = (CImport)m_tchart.get_Import();
   import1.LoadFromStream(var);


it shows error message: "Wrong *.tee file format"
can you show where the problem is?
or would tell me how to do?

TChart version: 2017 ActiveX

Thanks
sunxp
Newbie
Newbie
 
Posts: 3
Joined: Mon Nov 20, 2017 12:00 am

Re: tchart import : Wrong *.tee file format

Postby Yeray » Fri Jan 12, 2018 3:34 pm

Hello,

You are saving using XML and importing using Native tee format. Try using AsNative.SaveToStream to export your chart. Ie this works fine for me in VB6:

Code: Select all
  TChart1.Aspect.View3D = False
  TChart1.AddSeries scPie
  TChart1.Series(0).FillSampleValues 5
   
  TChart2.Import.LoadFromStream TChart1.Export.asNative.SaveToStream(True)
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: 8467
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia

Re: tchart import : Wrong *.tee file format

Postby sunxp » Mon Jan 15, 2018 2:36 am

Thanks for your answer. I have another question:
I saved the TChart(looks like attached file : origin.png) as *.tee file,
but when i open the saved file(*.tee file), it becomes this: saved.png, the background is changed.
can you help me to fix it?
Attachments
saved.png
saved.png (14.1 KiB) Viewed 341 times
origin.png
origin.png (16.18 KiB) Viewed 340 times
sunxp
Newbie
Newbie
 
Posts: 3
Joined: Mon Nov 20, 2017 12:00 am

Re: tchart import : Wrong *.tee file format

Postby Yeray » Mon Jan 15, 2018 8:54 am

Hello,

I've reproduced this problem so I've added it tot he public tracker:
http://bugs.teechart.net/show_bug.cgi?id=1966

Thanks for reporting it.
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: 8467
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia


Return to Activex

Who is online

Users browsing this forum: No registered users and 4 guests