ChartControl.DataSource Property

Gets or sets the chart control’s data source.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v21.2.dll


public object DataSource { get; set; }

Property Value

Type Description

A Object that represents the chart’s data source.


Use the DataSource property for data binding using a series template.

When a data source is assigned to the DataSource property, define the name of a data column upon which new series will be created (and named), via the Diagram.SeriesDataMember property. And, for the Diagram.SeriesTemplate property, choose the common view type for the auto-created series. Then, assign the required data fields to the Series.ArgumentDataMember and Series.ValueDataMember properties.

Note that if the Chart’s data source implements the INotifyCollectionChanged interface, the Chart Control automatically handles data source changes and updates its representation. Call the ChartControl.UpdateData method to update the Chart’s data manually in other cases.

See Also