Serialize Chart

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Des
Newbie
Newbie
Posts: 3
Joined: Tue May 14, 2019 12:00 am

Serialize Chart

Post by Des » Tue Jul 09, 2019 5:17 am

I'm unable to serialize the chart template. I get the below error.

Stream stream = new MemoryStream();
...Chart.Export.Template.Serialize(stream);

"Type 'Steema.TeeChart.WPF.Drawing.Graphics3DWPF' in Assembly 'TeeChart.WPF, Version=4.2019.5.15, Culture=neutral, ... is not marked as serializable."

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Serialize Chart

Post by Christopher » Tue Jul 09, 2019 7:30 am

Hello -

The following code running with TeeChart.WPF.dll v.4.2019.5.15 works as expected here:

Code: Select all

        private void TChart1_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var ms = new MemoryStream();
            tChart1.Export.Template.Save(ms);
            ms.Position = 0;
            tChart2.Import.Template.Load(ms);
        }
Could you please post a code snippet with which we can reproduce your issue here?
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Post Reply