Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

IChartSeries.Data Property

Returns source data that is used to create the series.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
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:

Drill-down chart

View Example

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