Donut Chart

A donut chart is a pie chart with a hollow center. The center space can be used for summary text or KPI values. Use it when you want a cleaner look than a standard pie chart.

Basic Usage

<ArcadiaDonutChart TItem="Category" Data="@data"
                 NameField="@(c => c.Name)"
                 ValueField="@(c => c.Amount)"
                 Height="350" Title="Revenue by Category" />

@code {
    record Category(string Name, double Amount);

    var data = new List<Category>
    {
        new("Electronics", 45000),
        new("Clothing", 28000),
        new("Food", 18000),
        new("Books", 9000),
    };
}

Custom Inner Radius

By default the inner radius is 0.55 (55% of the outer radius). Override it for a thinner or thicker ring:

<ArcadiaDonutChart InnerRadius="0.7" ... />

Parameters

ArcadiaDonutChart inherits from ArcadiaPieChart and shares all its parameters. The default InnerRadius is set to 0.55.

ParameterTypeDefaultDescription
NameFieldFunc<T, string>requiredCategory name selector
ValueFieldFunc<T, double>requiredValue selector
InnerRadiusdouble0.55Inner radius as fraction of outer (0 = pie, 1 = invisible)
ShowLabelsbooltrueShow percentage/value labels on slices
LabelFormatPieLabelFormatPercentLabel display format
MinLabelPercentdouble5Minimum percentage to show a label
ShowLegendbooltrueShow color legend below chart
SliceStrokeColorstring"white"Stroke color between slices
SliceStrokeWidthdouble2Stroke width between slices

Plus all shared ChartBase parameters.

Events

EventTypeDescription
OnPointClickEventCallback<PointClickEventArgs<T>>Fired when a slice is clicked

Accessibility

  • SVG has role="figure" and aria-label
  • Hidden <table> with Category, Value, and Percentage columns for screen readers
  • Animations respect prefers-reduced-motion

Use Cases

  • Budget breakdown — show spending distribution with a clean central space
  • Market share — compare competitor percentages
  • KPI dashboards — pair with a center label showing the total or primary metric