IChartSeries.Data Property
Returns source data that is used to create the series.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.1.dll
NuGet Package: DevExpress.Blazor
Declaration
IEnumerable<object> Data { get; }
Property Value
Type | Description |
---|---|
IEnumerable<Object> | A collection of objects that are used to create the series. |
Remarks
Handle a chart’s SeriesClick event, and use the ChartSeriesClickEventArgs.Series to access the series and its Data
.
The following example creates a drill-down chart, and uses the Data
property to obtain source data for a series that a user clicks. Returned data is visualized in the chart:
void OnSeriesClick(ChartSeriesClickEventArgs e) {
IEnumerable<SaleItem> newData;
string name;
if (e.Point != null) {
var pointData = (IEnumerable<SaleItem>)e.Point.DataItems;
var list = pointData.ToList();
list.Sort();
newData = list;
name = $"{e.Series.Name} ({e.Point.Argument})";
} else {
name = e.Series.Name;
if (name == preName)
return;
newData = (IEnumerable<SaleItem>)e.Series.Data;
}
@* ... *@
}
See Also