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

Defines Chart series settings.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public abstract class ChartSeriesSettings<T, TValue, TArgument> :
    IChartSeriesDataSettings<T, TValue, TArgument>

#Type Parameters

Name Description
T

The data item type.

TValue

The value axis type.

TArgument

The argument axis type.

#Remarks

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 specify settings for the rendered series. The context.Name property allows you to specify a series name whose values are used within a template.

Razor
<DxChart Data="@GridData">
    <DxChartTitle Text="Sales amount" />
    <DxChartCommonSeries
            SummaryMethod="Enumerable.Sum"
            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">
                </DxChartLineSeries>
            } else {
                <DxChartBarSeries Settings="@settings">
                    <DxChartSeriesLabel Visible="true"></DxChartSeriesLabel>
                </DxChartBarSeries>
            }
        </SeriesTemplate>
    </DxChartCommonSeries>
</DxChart>

Chart Series Template

Run Demo: Charts - Dynamic Series

#Inheritance

Object
ChartSeriesSettings<T, TValue, TArgument>
See Also