Whenever I use a Bar series in a chart, save this chart in the native TeeChart format (*.ten), and then later use TChart.Import.Template.Load to load this ten-file, the series marks on the Bar series are always visible, even if Marks -> Visible was switched off when I saved the chart.
As I use relatively large series, this causes the process of loading a ten-file to take extremely long, sometimes making it virtually impossible to load a ten-file.
The problem only occurs with bar series.
I am using TeeChart.NET v3.5.3188.18562 (Sept. 23 Release), but the problem has occurred in previous versions as well.
Marks always visible in Bar series when loading TEN-file
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi IHWB,
I'm not able to reproduce the problem here using this code:
Does it work fine at your end? Can you please modify it or send us a simple example project we can run "as-is" to reproduce the problem here?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
I'm not able to reproduce the problem here using this code:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private System.IO.MemoryStream stream;
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
bar1.FillSampleValues();
bar1.Marks.Visible = false;
stream = new System.IO.MemoryStream();
tChart1.Export.Template.Save(stream);
}
private void button1_Click(object sender, EventArgs e)
{
stream.Position = 0;
tChart2.Import.Template.Load(stream);
}
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Your example works fine for me. However, I've been able to pinpoint the problem I am experiencing. It occurs under the following circumstances:
* Add a Line series to the chart (e.g. with sample values)
* Change the line series to a Bar series (using the teechart editor). The bar series does not display marks and Marks -> Visible is also switched off.
* Export the chart to a TEN-file
* Import the TEN-File and the bar series displays marks!
* Add a Line series to the chart (e.g. with sample values)
* Change the line series to a Bar series (using the teechart editor). The bar series does not display marks and Marks -> Visible is also switched off.
* Export the chart to a TEN-file
* Import the TEN-File and the bar series displays marks!
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi IHWB,
Thanks for the information. I could reproduce the issue here. By default, Line series don't have visible marks while Bar series have visible marks. I guess something is missed in this serialization process. So I have added this issue (TF02013483) to the defect list to be fixed for next releases. In the meantime a workaround can be setting series marks to non-visible after loading a chart, for example:
Thanks for the information. I could reproduce the issue here. By default, Line series don't have visible marks while Bar series have visible marks. I guess something is missed in this serialization process. So I have added this issue (TF02013483) to the defect list to be fixed for next releases. In the meantime a workaround can be setting series marks to non-visible after loading a chart, for example:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
line1.FillSampleValues();
Steema.TeeChart.Styles.Series s = line1;
Steema.TeeChart.Styles.Series.ChangeType(ref s, typeof(Steema.TeeChart.Styles.Bar));
System.IO.MemoryStream stream = new System.IO.MemoryStream();
tChart1.Export.Template.Save(stream);
stream.Position = 0;
tChart1.Import.Template.Load(stream);
foreach (Steema.TeeChart.Styles.Series b in tChart1.Series)
{
b.Marks.Visible = false;
}
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |