Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ChartSerializer.Save Method (Stream)

.NET Framework 4.6 and 4.5

Saves chart data and properties with non-default values to an object that derives from the Stream class.

Namespace:  System.Web.UI.DataVisualization.Charting
Assembly:  System.Web.DataVisualization (in System.Web.DataVisualization.dll)

public void Save(
	Stream stream


Type: System.IO.Stream

An object derived from the Stream class, such as MemoryStream, that is used to save chart properties.

By default, all chart properties with non-default values, which includes data points, will be serialized when this method is called. To control chart characteristics to be serialized, use the Content, SerializableContent and NonSerializableContent properties.

If this method is used to save appearance properties as a template, make sure that the IsTemplateMode property of the ChartSerializer object is first set to true before calling this method.

Serialization of a chart as a template occurs differently from non-template serialization; template serialization concentrates on Appearance properties.

When a template is serialized, the LoadTemplate method can be used to load the template, to provide the Appearance properties for a chart.

Templates can be used to simulate custom palettes.

.NET Framework

Supported in: 4.6, 4.5, 4
© 2015 Microsoft