Pie, donut and radial bar
Pie and donut charts, and radial bars, for Blazor: the x value names each slice and the legend lists the slices. Click a legend item to hide a slice.
Pie
Percentages inside slices that fit; small slices get outside labels with leader lines. GroupSmallSlices merges tiny ones into "Other", which gets one legend item; hover it to see what it holds, click it to hide it (its id in HiddenSeries is SeriesOptions.OtherSliceKey).
Use the arrow keys to move between slices. Press Escape to leave.
Code
<RioChart TItem="Share" Title="Revenue by category, this year">
<PieSeries Items="revenue" XValue="s => s.Name" YValue="s => s.Value" GroupSmallSlices="0.03" Format="0 k€" />
</RioChart>Donut
A pie with a hole, and the total in the middle.
Use the arrow keys to move between slices. Press Escape to leave.
Code
<RioChart TItem="Share" Legend="new LegendOptions { Position = LegendPosition.Right }">
<DonutSeries Items="revenue" XValue="s => s.Name" YValue="s => s.Value" Format="0 k€" />
</RioChart>Half donut and nested rings
Start and end angles make a half donut that uses the full height. Several pie series become rings: here revenue per sales channel, this year outside and last year inside.
Use the arrow keys to move between slices. Press Escape to leave.
Use the arrow keys to move between slices. Press Escape to leave.
Code
<DonutSeries Items="channels" XValue="s => s.Name" YValue="s => s.Value" StartAngle="-90" EndAngle="90" />
<PieSeries Items="channels" Name="2026" ... InnerRadius="0.35" /> @* outer ring *@
<PieSeries Items="lastYear" Name="2025" ... /> @* inner ring *@Radial bars
One track per category, filled up to Max.
Use the arrow keys to move between slices. Press Escape to leave.
Code
<RadialBarSeries Items="goals" XValue="s => s.Name" YValue="s => s.Value" Max="100" Format="0'%'" />