Skip to main content

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

Specifies a series template.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor


public RenderFragment<ChartSeriesSettings<T, TGroup, TValue, TArgument>> SeriesTemplate { get; set; }

Property Value

Type Description
RenderFragment<ChartSeriesSettings<T, TGroup, TValue, TArgument>>

The template content.


Use the template’s context parameter to access the series settings (a ChartSeriesSettings object).

<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.GroupKey == 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