Dear Steema,
I am using Moving Average function on my chart. also keeping object of class in tag of Moving Average. This works fine but when I am enabling magnifier tool. Chart crashes with error.
Kindly find the Simple Sample Project from below link.
Using function tag with Magnifier
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Using function tag with Magnifier
Hello,
The problem is with the line:
If you comment this line out, there is no problem. The issue is that the Magnifier tool serializes the Chart by binary serialization, and a System.Windows.Forms.Form cannot be serialized. You can assign other values to Tag and have them serialized, e.g.
The problem is with the line:
Code: Select all
tMovAvg.Tag = MyPopup;
Code: Select all
object o = 50;
tMovAvg.Tag = o;
Best Regards,
Christopher Ireland / 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 |
Re: Using function tag with Magnifier
Dear Steema,
We require to keep propertybag class object related to that particular series. We are placing n number of moving averages on chart and keeping all settings related with respective function. This works as expected without any problem except The Magnifier tool where we get error. We cant serialize propertybag class. So kindly resolve issue in Magnifier tool.
We require to keep propertybag class object related to that particular series. We are placing n number of moving averages on chart and keeping all settings related with respective function. This works as expected without any problem except The Magnifier tool where we get error. We cant serialize propertybag class. So kindly resolve issue in Magnifier tool.
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Using function tag with Magnifier
This problem is generic to serialization, and is not specific to the Magnifier tool. You can see it is a generic problem by running code such as the following:Quant wrote:We cant serialize propertybag class. So kindly resolve issue in Magnifier tool.
Code: Select all
private void InitializeChart()
{
Form newForm = new Form();
Bar series = new Bar(tChart1.Chart);
series.FillSampleValues();
series.Tag = newForm;
}
private void button2_Click(object sender, EventArgs e)
{
MemoryStream ms = new MemoryStream();
tChart1.Export.Template.Save(ms);
ms.Position = 0;
tChart2.Import.Template.Load(ms);
}
Best Regards,
Christopher Ireland / 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 |