ChartControl XML Serialization

Hi,

I'm trying to serialyze some Syncfusion objects, particularly ChartControls, and I not able to do it.

Do you have a method to serialyze/deserialyze a Charcontrol? When I say serialyze I don't mean export only the points, I want to serlialyze every public fields and be able to retrieve the whole charts easily?

An XLM serialization would be absolutely perfect !

Thank you very much in advance.

Yannick


2 Replies

YN Yannick Nabrin February 14, 2011 04:58 AM UTC

This is what I'm trying to do, I have an XML fatal error

ChartControl chart = new ChartControl();
Stream s = null;
s = File.Create("C:\\HOMEWARE\\" + chart.Titles[0].Text + ".xml");

System.Xml.XmlWriter xw = new System.Xml.XmlTextWriter(s, System.Text.Encoding.UTF8);

System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(chart.Series.GetType());
xs.Serialize(xw, chart.Series);



SA Saravanan A Syncfusion Team February 15, 2011 08:31 AM UTC

Hi Yannick,

Thanks for choosing Syncfusion products.

Based on your requirement we have created a simple sample. Please download the sample from below location.

Sample: http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=Serialization-660479702.zip

For further reference on serialization/deserialization you can refer Essential studio(2011, vol1) sample browser. In which we have already created a sample for serialization in the following path.

Path: Essential Chart/User interaction/Serialization Demo

Please let us know if you have any queries.

Thanks,
Saravanan



Loader.
Up arrow icon