tchart import : Wrong *.tee file format

TeeChart for ActiveX, COM and ASP
Post Reply
sunxp
Newbie
Newbie
Posts: 3
Joined: Mon Nov 20, 2017 12:00 am

tchart import : Wrong *.tee file format

Post by 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

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

Re: tchart import : Wrong *.tee file format

Post by 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 Please read our Bug Fixing Policy

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

Re: tchart import : Wrong *.tee file format

Post by 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 13094 times
origin.png
origin.png (16.18 KiB) Viewed 13093 times

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

Re: tchart import : Wrong *.tee file format

Post by 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 Please read our Bug Fixing Policy

Post Reply