Hi actually Im develop with TeeChart, and I need to save to an XML my Chart but when i use:
System.IO.MemoryStream fs = new System.IO.MemoryStream();
Steema.TeeChart.Export.DataExport dataExport = new Steema.TeeChart.Export.DataExport(graphic.Chart);
dataExport.XML.IncludeHeader = true;
dataExport.XML.IncludeIndex = true;
dataExport.XML.IncludeLabels = true;
dataExport.XML.IncludeSeriesTitle = true;
dataExport.XML.Save(fs);
fs.Flush();
XmlDocument xmlPanel = new XmlDocument();
fs.Seek(0, System.IO.SeekOrigin.Begin);
xmlPanel.Load(fs);
fs.Close();
I only save the data, labels, index and headers. So I need to save the colors the position the rotation, and too much information, so How I can save all the information for latter save all this in a XML
Later When I load the information I do the next
XmlDocument xmlMain = new XmlDocument();
XmlNode nodeImp = xmlMain.ImportNode(nodeGraph, true);
xmlMain.AppendChild(nodeImp);
System.IO.MemoryStream ms = new System.IO.MemoryStream();
xmlMain.Save(ms);
string s = xmlMain.InnerXml;
ms.Flush();
ms.Seek(0, System.IO.SeekOrigin.Begin);
ms.Position = 0;
Steema.TeeChart.Import.Imports();
graphic.Chart.Import.Template.Load(ms);
graphic.Import.Template.Load(ms);
graphic.Refresh();
But it send an error to say that couldn't load binary data.
Please What can I do to solve my problem..
How to serialize all the teechart
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi fchio,
The easiest way to achieve what you request is exporting TeeChart to its native template file format which also supports exporting chart's data. For more information please read Tutorial 12 - Exporting and Importing Charts
, specially the TeeChart's 'Ten' template and data export import format section. TeeChart native templates can be either stored in a file or a MemoryStream.
The easiest way to achieve what you request is exporting TeeChart to its native template file format which also supports exporting chart's data. For more information please read Tutorial 12 - Exporting and Importing Charts
, specially the TeeChart's 'Ten' template and data export import format section. TeeChart native templates can be either stored in a file or a MemoryStream.
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 |