Page 1 of 1

Adding multiple points after Template.Load crashes

Posted: Tue Apr 16, 2024 7:09 pm
by 15696632
Visual Studio 2022
Target framework .NET 6.0
Steema.TeeChart.net Version 4.2024.4.12

After a template is imported using the Load Command, it crashes after adding more the one point to the series. It crashes in 2nd LoadData. This example works if only 1 point is added.

public partial class Form1 : Form
{
Steema.TeeChart.TChart tChart1;
public Form1()
{
InitializeComponent();
tChart1 = new Steema.TeeChart.TChart();
this.Controls.Add(tChart1);
tChart1.Dock = DockStyle.Fill;
tChart1.Axes.Bottom.Visible = true;
tChart1.Axes.Left.Visible = true;
tChart1.Axes.Right.Visible = false;
tChart1.Legend.Visible = false;

Line line = new Line();
tChart1.Chart.Series.Add(line);

LoadData();

TemplateExport template = tChart1.Export.Template;
template.IncludeData = false;
tChart1.Export.Template.Save("template.json");


tChart1.Import.Template.Load("template.json");
LoadData();
}


private void LoadData()
{
var line = tChart1.Chart.Series[0];
line.Add(1, 1);
line.Add(2, 2);
line.Add(3, 3);
}
}

Re: Adding multiple points after Template.Load crashes

Posted: Thu Apr 18, 2024 8:10 am
by edu
Thank you for the issue report. We are investigating possible causes.

Re: Adding multiple points after Template.Load crashes

Posted: Tue May 14, 2024 5:51 pm
by 15696632
Any update on this issue?
Thanks.

Re: Adding multiple points after Template.Load crashes

Posted: Wed May 15, 2024 7:13 am
by edu
Hi, a fix has been made that will be included with the next update, due for imminent release this week.


Regards,
Edu

Re: Adding multiple points after Template.Load crashes

Posted: Wed May 15, 2024 12:39 pm
by 15696632
Thanks for letting me know.

Re: Adding multiple points after Template.Load crashes

Posted: Fri May 17, 2024 7:26 am
by edu
Hi, the TeeChart nuget has been updated. The version includes a fix to the problem you have reported.

https://www.nuget.org/packages/Steema.T ... .2024.5.16

Re: Adding multiple points after Template.Load crashes

Posted: Mon May 20, 2024 2:56 pm
by 15696632
Thanks for that. Tried it out and is working now.