Hello All,
Format Style option doesn't reflected to the chart after deserialization (teechart 2.0.2306.26232):
1) add 2 charts to winform
2) create horizntal bar serier in tChart1
3) fill that serier with sample values
horizBar1.FillSampleValues();
4) raise teechart property
Steema.TeeChart.Editor editor = new Steema.TeeChart.Editor(tChart1);
editor.ShowModal();
5) go to Series->Format
modify Series->Format->Style to Rect. Gradient.
6) run next code
// save chart
BinaryFormatter serializer = new BinaryFormatter();
MemoryStream ms = new MemoryStream();
serializer.Serialize(ms, tChart1);
// restore chart1 to chart2
BinaryFormatter serializer2 = new BinaryFormatter();
ms.Position = 0;
tChart2 = (TChart)serializer2.Deserialize(ms);
tChart2.Refresh();
As you can see the second chart doesn't have "Rect. Gradient." effects, but the property is still set!!
Any ideas how to eliminate it?
Thanks.
Bug with serialization Format->Style
-
- Newbie
- Posts: 21
- Joined: Mon Mar 27, 2006 12:00 am
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hello,
It works fine for me here using the code below. Can you please test if it works at your end?
It works fine for me here using the code below. Can you please test if it works at your end?
Code: Select all
private Steema.TeeChart.Styles.HorizBar horizBar1;
private void Form1_Load(object sender, EventArgs e)
{
horizBar1 = new Steema.TeeChart.Styles.HorizBar(tChart1.Chart);
horizBar1.FillSampleValues();
}
MemoryStream ms;
private void button1_Click(object sender, EventArgs e)
{
ms = new MemoryStream();
tChart1.Export.Template.Save(ms);
}
private void button2_Click(object sender, EventArgs e)
{
ms.Position = 0;
tChart2.Import.Template.Load(ms);
}
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 |