IncludeData in TemplateExport not working in .net 6.0
Posted: Wed Apr 03, 2024 5:16 pm
Visual Studio 2022
Target framework .NET 6.0
Steema.TeeChart.net Version 4.2024.3.15
When exporting a template with the flag IncludeData set to false the data seems to be included. I tried it on .net framework and it seems to work correctly there. Here is the code.
Thanks,
Akshob
Target framework .NET 6.0
Steema.TeeChart.net Version 4.2024.3.15
When exporting a template with the flag IncludeData set to false the data seems to be included. I tried it on .net framework and it seems to work correctly there. Here is the code.
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.Fill;
tChart1.Axes.Bottom.Visible = true;
tChart1.Axes.Left.Visible = true;
tChart1.Axes.Right.Visible = false;
tChart1.Legend.Visible = false;
LoadData();
TemplateExport template = tChart1.Export.Template;
template.IncludeData = false;
tChart1.Export.Template.Save("template.json");
// tChart1.Import.Template.Load("template.json");
}
private void LoadData()
{
tChart1.Legend.Alignment = Steema.TeeChart.LegendAlignments.Bottom;
Series line = new Line();
line.Marks.FollowSeriesColor = true;
tChart1.Chart.Series.Add(line);
for (int i = 0; i < 1000; i++)
{
line.Add(i, i);
}
}
}
Akshob