Skip to main content
A newer version of this page is available. .

DxChartDonutSeries<T, TArgument, TValue> Class

Defines a donut series.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.1.dll

NuGet Package: DevExpress.Blazor

Declaration

public class DxChartDonutSeries<T, TArgument, TValue> :
    DxChartSeries<T, TArgument, TValue, ChartDonutSeriesModel<T, TArgument, TValue>>

Type Parameters

Name Description
T

The type of data.

TArgument

The type of arguments.

TValue

The type of values.

Remarks

The following image shows a donut chart sample:

Charts - Donut series

Use the chart’s Data property to specify an IEnumerable<T> data source, and the ArgumentField and ValueField properties to specify data source fields that contain arguments and values for chart points. For a sample data source, refer to our GitHub repository.

<DxChart Data="@SalesData">
    <DxChartTitle Text="Total Sales" />
    <DxChartLegend AllowToggleSeries="true" VerticalAlignment="VerticalEdge.Bottom" Position="RelativePosition.Outside" />
    <DxChartDonutSeries ValueField="@((SaleInfo i) => i.Amount)"
                        ArgumentField="@(i => i.City)"
                        SummaryMethod="Enumerable.Sum">
        <DxChartSeriesLabel Visible="true" />
    </DxChartDonutSeries>
</DxChart>

@code {
    IEnumerable<SaleInfo> SalesData;

    protected override async Task OnInitializedAsync() {
        SalesData = (await Sales.GetSalesAsync()).Where(x => x.Country == "United States");
    }
}

Inheritance

Object
ComponentBase
DxSettingsComponent<DevExpress.Blazor.Internal.ChartSeriesModelBase>
DxComplexSettingsComponent<DxChartSeries, DevExpress.Blazor.Internal.ChartSeriesModelBase>
DxChartSeries
DxChartSeries<T, TArgument, TValue, TValue, DevExpress.Blazor.Internal.ChartDonutSeriesModel<T, TArgument, TValue>>
DxChartSeries<T, TArgument, TValue, DevExpress.Blazor.Internal.ChartDonutSeriesModel<T, TArgument, TValue>>
DxChartDonutSeries<T, TArgument, TValue>
See Also