ChartSeriesSettings<T, TValue, TArgument>.Name Property

Specifies a series name.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.1.dll


public virtual string Name { get; set; }

Property Value

Type Description

A series name.


The SeriesTemplate property allows you to specify a template for a Chart series. The property gets an object of the ChartSeriesSettings type that contains information about the rendered series. To access this object, use the template’s context parameter.

Assign the obtained context to the Settings property to provide the rendered series with the series settings. The context.Name property allows you to specify a series name whose values are used within a template.

<DxChart Data="@GridData">
    <DxChartTitle Text="Sales amount" />
            NameField="@((SaleInfo s) => s.Date.Year)" 
            ArgumentField="@((SaleInfo s) => s.City)" 
            ValueField="@((SaleInfo s) => s.Amount)">
        <SeriesTemplate Context="settings">
            @if(settings.Name == "2015") {
                <DxChartLineSeries Name="Last year" Settings="@settings">
            } else {
                <DxChartBarSeries Settings="@settings">
                    <DxChartSeriesLabel Visible="true"></DxChartSeriesLabel>

Chart Series Template

Run Demo: Charts - Dynamic Series

See Also