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.v21.1.dll

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 provides 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