Skip to main content
All docs
V26.1
  • DxChartXYSeries<T, TArgument, TValue, TAggregate>.Settings Property

    Accepts series settings when you create a series template.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v26.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    [Parameter]
    public ChartSeriesSettings<T, TValue, TArgument> Settings { get; set; }

    Property Value

    Type Description
    ChartSeriesSettings<T, TValue, TArgument>

    The settings of a series.

    Remarks

    The SeriesTemplate property allows you to specify a template for a series. The property gets an object of the ChartSeriesSettings<T, TGroupKey, TValue, TArgument> type that contains information about the currently rendered series. This object can be accessed in the template rendering process by the context parameter.

    Assign the context to the Settings property to specify settings for the rendered series.

    Blazor Chart - Autogenerated Series

    @inject ISalesInfoDataProvider Sales
    
    <DxChart @ref="@chart"
             Data="@chartData"
             LabelOverlap="ChartLabelOverlap.Hide"
             Width="100%">
    
        <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.GroupKey == 2019) {
                    <DxChartLineSeries Name='Last year'
                                       Settings="@settings" />
                }
                else {
                    <DxChartBarSeries Settings="@settings">
                        <DxChartSeriesLabel Visible="true" />
                    </DxChartBarSeries>
                }
            </SeriesTemplate>
        </DxChartCommonSeries>
    
    </DxChart>
    

    Run Demo: Charts - Autogenerated Series

    See Also