Temlates
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi UserLS,
This works fine for me here using latest TeeChart for .NET v3 available at the download area and this code:
Also, I've found there's a similar issue (TF02013483) here and checked that it was fixed in 3rd November 2008 release (Build 3.5.3225.32183/4/5) as can be seen in the release notes.
Could you please try using last public version available and, if necessary, modify the code snippet above so that we can reproduce the issue here?
Thanks in advance.
This works fine for me here using latest TeeChart for .NET v3 available at the download area and this code:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
bar1.FillSampleValues();
bar1.Marks.Visible = false;
System.IO.MemoryStream stream = new System.IO.MemoryStream();
tChart1.Export.Template.Save(stream);
tChart1.Clear();
stream.Position = 0;
tChart1.Import.Template.Load(stream);
}
Could you please try using last public version available and, if necessary, modify the code snippet above so that we can reproduce the issue here?
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi UserLS,
Ok, I could reproduce this here using the code below and added the defect to the bug list (TF02013684) to be fixed. In the meantime, a workaround is uncommenting the foreach statement in the example.
Ok, I could reproduce this here using the code below and added the defect to the bug list (TF02013684) to be fixed. In the meantime, a workaround is uncommenting the foreach statement in the 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.HorizBar));
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi UserLS,
In that case the only solution I can think of is saving an array with marks settings before exporting the chart and then loading them back:
If this is not feasible at your end you'll have to wait for the issue being fixed.
In that case the only solution I can think of is saving an array with marks settings before exporting the chart and then loading them back:
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.HorizBar));
Boolean[] visibleMarks = new Boolean[tChart1.Series.Count];
for (int i = 0; i < visibleMarks.Length; i++)
{
visibleMarks[i] = tChart1[i].Marks.Visible;
}
System.IO.MemoryStream stream = new System.IO.MemoryStream();
tChart1.Export.Template.Save(stream);
stream.Position = 0;
tChart1.Import.Template.Load(stream);
for (int i = 0; i < visibleMarks.Length; i++)
{
tChart1[i].Marks.Visible = visibleMarks[i];
}
}
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 |
In theory we can do it, but basically what you suggest is: every time I save a template, I need to write another file, which contains all the information, you failed to include into a template file. When I load it back, I need to find that second file, which goes with the template and after loading apply all the fixes.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi UserLS,
I posted this only as a workaround suggestion until a fix is implemented and not as a permament solution. This issue has been added to the TeeChart for .NET v3 bug list (TF02013684) to be fixed for next releases. I think this should be easy to fix as it is the same as TF02013684 but for horizontal series. I strongly recommend you to be aware at this forums or subscribe to our RSS news feed for new release announcements and what's fixed/implemented on them.
Thanks in advance.
I posted this only as a workaround suggestion until a fix is implemented and not as a permament solution. This issue has been added to the TeeChart for .NET v3 bug list (TF02013684) to be fixed for next releases. I think this should be easy to fix as it is the same as TF02013684 but for horizontal series. I strongly recommend you to be aware at this forums or subscribe to our RSS news feed for new release announcements and what's fixed/implemented on them.
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 |