Tritium UI
TritiumPieChart
Show parts of a whole as a pie or donut, with explode, a legend, and PNG export.
Key features
- Bind one PieSeries to a collection with label and value property paths.
- Set HoleRadius above zero to draw a donut.
- Explode a slice by index, or explode the slice the user selects.
- Show or hide the legend and tooltips, and play a short series animation.
- Show a custom empty-state message when there is no data.
- Select a slice and handle SeriesPointSelected.
- Export the chart to a PNG stream or file.
Platforms
Android, iOS, Mac Catalyst, and Windows 10 version 19041 and later (.NET 10 MAUI).
Main API
- Series . The single pie series (labels and values).
- HoleRadius . Inner hole size; zero is a pie, larger values make a donut.
- ExplodedIndex . Which slice is pulled out; ExplodeSelected pulls out the tapped slice.
- SeriesPointSelected . Fires when the user selects a slice.
Basic example
Declare this namespace on the page.
xmlns:charts="clr-namespace:Tritium.Maui.Charts;assembly=Tritium.Maui.Charts"
<charts:TritiumPieChart HoleRadius="0.55" IsLegendVisible="True">
<charts:TritiumPieChart.Series>
<charts:PieSeries ItemsSource="{Binding Shares}" XBindingPath="Name" YBindingPath="Amount" />
</charts:TritiumPieChart.Series>
</charts:TritiumPieChart> Add the package source from your license, then reference the package that includes this control. These packages are not on the public NuGet Gallery.