Skip to main content

ChartElement.Tag Property

SECURITY NOTE

Deserializing layout settings from untrusted resources may create security issues. Serializable System.Object properties that contain custom type values are not (de)serialized automatically. Review the following help topic for information on how to (de)serialize custom type values: Safe Deserialization.

Gets or sets the object that contains data related to the chart element.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v23.2.dll

NuGet Package: DevExpress.Charts

Declaration

[XtraChartsLocalizableCategory(XtraChartsCategory.Misc)]
public object Tag { get; set; }

Property Value

Type Description
Object

A Object that contains data about the chart element.

Remarks

Any type derived from the Object class can be assigned to this property. Use it to store data associated with a particular chart element (e.g., an annotaton, an axis, an axis title, a diagram).

Note

If a chart is bound to data, the Tag property is automatically assigned to the underlying object used to create this chart element (e.g. to the corresponding DataRowView object, if a chart is bound to a DataTable).

Important

When the chart is serialized, only string Tag values are saved.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Tag property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also