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

ChartSeriesSettings<T, TValue, TArgument>.Data Property

Contains current series data.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public IEnumerable<T> Data { get; protected set; }

#Property Value

Type Description
IEnumerable<T>

Series data.

#Remarks

The following example uses the Data property to set the Stack property value in a SeriesTemplate. The stacks in the chart below correspond to gender.

<DxChart T="PopulationAgeStructureItem"
         Data="@ChartsData"
         Width="100%">
    <DxChartCommonSeries T="PopulationAgeStructureItem"
                         TArgument="string"
                         TValue="int"
                         TGroup="string"
                         NameField='pasi => $"{pasi.Gender}: {pasi.AgeGroup}"'>
        <SeriesTemplate Context="settings">
            <DxChartStackedBarSeries Settings="@settings"
                                     ArgumentField="pasi => pasi.Country"
                                     ValueField="pasi => pasi.Population"
                                     Stack="@settings.Data.First().Gender" />
        </SeriesTemplate>
    </DxChartCommonSeries>
    @* ... *@
</DxChart>

@code {
    IEnumerable<PopulationAgeStructureItem> ChartsData;
    protected override async Task OnInitializedAsync()
    {
        ChartsData = await DataProvider.QueryData();
    }
}
See Also