Export (0) Print
Expand All

ChartSerializer.Content Property

Gets or sets the type of chart content to be serialized.

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

public SerializationContents Content { get; set; }

Property Value

Type: System.Web.UI.DataVisualization.Charting.SerializationContents
A SerializationContents enumeration value that represents the chart content that will be serialized during a load, save or reset operation. By default, all non-default chart properties, including data, are persisted.

By default, all chart properties will be serialized when any of the Save and Load methods are called. To provide more control over what is serialized, use the Content property. Note that the SerializableContent and NonSerializableContent properties can also be used along with the Content property.

Important   The Content property determines types of chart characteristics, such as "appearance", to be serialized, and is actually implemented internally as the SerializableContent property. This means that setting the Content property and then setting the SerializableContent property will result in the Content property value being overridden, unless SerializableContent is concatenated. See the sample code below for an example of this procedure.

If you set the Content property, all ChartArea and Series objects names will automatically be serialized; this means that serialized data that pertains to chart areas and series will be applied to existing objects when loaded.

Setting this property affects all load, save and reset operations.

.NET Framework

Supported in: 4.6, 4.5, 4
Show:
© 2015 Microsoft