In This Topic
Nevron NOV Chart for .NET supports serialization of its state to a file or stream in xml and binary formats. The serialization functionality is exposed by several methods of the NChartView object.
Serialization to File
The NChartView object SaveToFile and LoadFromFile methods can be used to save / load the chart state to / from a file:
C# |
Copy Code
|
// Save the chart state to chartstate.xml chartView.SaveToFile("c:\\chartstate.xml", new NNevronXmlChartFormat());
// Load the chart state from chartstate.xml chartView.LoadFromFile("c:\\chartstate.xml", new NNevronXmlChartFormat());
|
Serialization to Stream
The NChartView object SaveToStream and LoadFromStream methods can be used to save / load the chart state to / from a stream:
C# |
Copy Code
|
MemoryStream memoryStream = new MemoryStream();
// Save the chart state to memory stream
chartView.SaveToStream(memoryStream, new NNevronBinaryChartFormat());
// Load the chart state from memory stream
memoryStream.Seek(0, SeekOrigin.Begin);
chartView.LoadFromStream(memoryStream, new NNevronBinaryChartFormat());
|
See Also