TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
-
akshobrao
- Newbie
- Posts: 12
- Joined: Fri Aug 25, 2023 12:00 am
Post
by akshobrao » Tue Nov 07, 2023 2:14 pm
Visual Studio 2022
.NET Framework 4.8
Steema.TeeChart.net Version 4.2023.11.6
I am exporting a template and trying to import it back and it crashing. There are two pieces of code which seem to crash the loading of the template. First is line.Marks.FollowSeriesColor = true in the code below and the second is tChart1.Tools.Add(new Steema.TeeChart.Tools.CursorTool()); The code is below and i have commented out those two lines and it seems to work. When adding each line it crashes.
Code: Select all
public partial class Form1 : Form
{
Steema.TeeChart.TChart tChart1;
public Form1()
{
InitializeComponent();
tChart1 = new Steema.TeeChart.TChart();
this.Controls.Add(tChart1);
tChart1.Dock = DockStyle.Top;
InitializeChart();
}
private void InitializeChart()
{
tChart1.Chart.Header.Visible = true;
Line line = new Line();
line.Stairs = true;
line.VertAxis = VerticalAxis.Left;
//line.Marks.FollowSeriesColor = true;
tChart1.Series.Add(line);
//tChart1.Tools.Add(new Steema.TeeChart.Tools.CursorTool());
}
private void button1_Click(object sender, EventArgs e)
{
File.Delete("template.json");
tChart1.Export.Template.IncludeData = false;
tChart1.Export.Template.Save("template.json");
}
private void button2_Click(object sender, EventArgs e)
{
tChart1 = new Steema.TeeChart.TChart();
this.Controls.Add(tChart1);
tChart1.Dock = DockStyle.Top;
tChart1.Import.Template.Load("template.json");
tChart1.Refresh();
}
}
-
Marc
- Site Admin
- Posts: 1272
- Joined: Thu Oct 16, 2003 4:00 am
- Location: Girona
-
Contact:
Post
by Marc » Wed Nov 08, 2023 7:12 am
Hello,
Using your test code in a NET 4.8 project, I am unable to reproduce the problem. The template loads correctly, respecting the two code lines:
Code: Select all
line.Marks.FollowSeriesColor = true;
tChart1.Tools.Add(new Steema.TeeChart.Tools.CursorTool());
I have tested with TeeChart release 4.2023.11.6 in VSNet2019 and VSNet2022..
If you are able to send us a sample project that reproduces the issue, we'll check it for other elements/causes.
With thanks.
Regards,
Marc Meumann
Steema Support
-
akshobrao
- Newbie
- Posts: 12
- Joined: Fri Aug 25, 2023 12:00 am
Post
by akshobrao » Wed Nov 08, 2023 1:59 pm
Hi Marc,
It seems to crash here. I have attached screenshots when running in debug mode where it crashes. I created a winforms application with these files in it. Let me know if you can reproduce it with this.
Thanks.
-
Attachments
-
- Files.zip
- (3.29 KiB) Downloaded 1385 times
-
- Crash2.PNG (127.15 KiB) Viewed 16646 times
-
- Crash.PNG (91.32 KiB) Viewed 16646 times
-
Marc
- Site Admin
- Posts: 1272
- Joined: Thu Oct 16, 2003 4:00 am
- Location: Girona
-
Contact:
Post
by Marc » Wed Nov 08, 2023 4:50 pm
Hello,
Thanks you for the extra info. I can reproduce the error in a fresh project. My test project may be hanging on to a cached-package reference; I'm checking for differences and cause.
Regards,
Marc
Steema Support
-
Marc
- Site Admin
- Posts: 1272
- Joined: Thu Oct 16, 2003 4:00 am
- Location: Girona
-
Contact:
Post
by Marc » Tue Nov 14, 2023 10:02 am
Hello,
As a follow-up, A fix has been applied to TeeChart code to be included with the next update release.
Regards,
Marc
Steema Support