Adding multiple points after Template.Load crashes

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
akshobrao
Newbie
Newbie
Posts: 12
Joined: Fri Aug 25, 2023 12:00 am

Adding multiple points after Template.Load crashes

Post by akshobrao » Tue Apr 16, 2024 7:09 pm

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);
}
}
Attachments
Screenshot 2024-04-16 140524.png
Screenshot 2024-04-16 140524.png (29.3 KiB) Viewed 19551 times

Edu
Newbie
Newbie
Posts: 37
Joined: Tue Nov 28, 2023 12:00 am

Re: Adding multiple points after Template.Load crashes

Post by Edu » Thu Apr 18, 2024 8:10 am

Thank you for the issue report. We are investigating possible causes.
Edu
Steema Support

akshobrao
Newbie
Newbie
Posts: 12
Joined: Fri Aug 25, 2023 12:00 am

Re: Adding multiple points after Template.Load crashes

Post by akshobrao » Tue May 14, 2024 5:51 pm

Any update on this issue?
Thanks.

Edu
Newbie
Newbie
Posts: 37
Joined: Tue Nov 28, 2023 12:00 am

Re: Adding multiple points after Template.Load crashes

Post by Edu » Wed May 15, 2024 7:13 am

Hi, a fix has been made that will be included with the next update, due for imminent release this week.


Regards,
Edu
Edu
Steema Support

akshobrao
Newbie
Newbie
Posts: 12
Joined: Fri Aug 25, 2023 12:00 am

Re: Adding multiple points after Template.Load crashes

Post by akshobrao » Wed May 15, 2024 12:39 pm

Thanks for letting me know.

Edu
Newbie
Newbie
Posts: 37
Joined: Tue Nov 28, 2023 12:00 am

Re: Adding multiple points after Template.Load crashes

Post by Edu » Fri May 17, 2024 7:26 am

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
Edu
Steema Support

akshobrao
Newbie
Newbie
Posts: 12
Joined: Fri Aug 25, 2023 12:00 am

Re: Adding multiple points after Template.Load crashes

Post by akshobrao » Mon May 20, 2024 2:56 pm

Thanks for that. Tried it out and is working now.

Post Reply