Importing data not setting the series title correctly (.net 6)
Posted: Tue Jul 23, 2024 5:21 pm
Visual Studio 2022
Target framework .NET 6.0
Steema.TeeChart.net Version 4.2024.7.22
After loading a template file the series title does not get saved off correctly. This seems to work in ,netFramework but not in .net 6.0. In the two screenshots below the one in .net framework puts the Title to "test" whereas the on in .net 6.0 puts title to "line1"
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 = true;
tChart1.Legend.LegendStyle = LegendStyles.Series;
LoadData();
TemplateExport template = tChart1.Export.Template;
template.IncludeData = true;
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.Title = "test";
line.Marks.FollowSeriesColor = true;
tChart1.Chart.Series.Add(line);
for (int i = 0; i < 1000; i++)
{
line.Add(i, i);
}
}
}
Target framework .NET 6.0
Steema.TeeChart.net Version 4.2024.7.22
After loading a template file the series title does not get saved off correctly. This seems to work in ,netFramework but not in .net 6.0. In the two screenshots below the one in .net framework puts the Title to "test" whereas the on in .net 6.0 puts title to "line1"
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 = true;
tChart1.Legend.LegendStyle = LegendStyles.Series;
LoadData();
TemplateExport template = tChart1.Export.Template;
template.IncludeData = true;
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.Title = "test";
line.Marks.FollowSeriesColor = true;
tChart1.Chart.Series.Add(line);
for (int i = 0; i < 1000; i++)
{
line.Add(i, i);
}
}
}