Skip to main content

DxChartCommonSeries<T, TGroup, TValue, TArgument>.NameField Property

Specifies a data source field that is used to group data by series.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public Expression<Func<T, TGroup>> NameField { get; set; }

Property Value

Type Description
Expression<Func<T, TGroup>>

A lambda expression that returns series names.

Remarks

Use the NameField option to specify a data source field that is used to group data. Every group defines data for a particular series. The series Name property is set to a group key.

<DxChart Data="@ChartsData">
    <DxChartCommonSeries NameField="@((SaleInfo s) => s.Date.Year)" Filter="@((SaleInfo s) => s.Region == "Europe")" 
                         SummaryMethod="Enumerable.Sum" ArgumentField="@((SaleInfo s) => s.City)" 
                         ValueField="@((SaleInfo s) => s.Amount)" SeriesType="@(ChartSeriesType.Bar)" />
</DxChart>

Chart Common Series

Online Demo

Charts - Dynamic Series

See Also