Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2288

Summary: TeeChart NetStandard (Core) error when export-serializing
Product: .NET TeeChart Reporter: marc meumann <marc>
Component: ChartAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED WORKSFORME    
Severity: major CC: chris
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description marc meumann 2020-02-12 04:58:47 EST
Fails to serialize correctly when exporting as definition.
Comment 1 christopher ireland 2020-04-01 06:36:48 EDT
Using the head-revision on GitLab of the TeeChart.Standard.NETStd.dll, the following works as expected:

        static void Main(string[] args)
        {
            var chart1 = new Chart();
            var chart2 = new Chart();

            chart1.Series.Add(typeof(Bar)).FillSampleValues();

            chart1.Export.Image.PNG.Save(@"C:\tmp\ciimage1.png");

            var ms = new MemoryStream();
            chart1.Export.Template.Save(ms);
            ms.Position = 0;
            var newChart = chart2.Import.Template.Load(ms);

            newChart.Export.Image.PNG.Save(@"C:\tmp\ciimage2.png"); //works
            chart2.Export.Image.PNG.Save(@"C:\tmp\ciimage3.png"); //does not work

            Console.WriteLine("Hello World!");
        }