data_key) and which holds the labels (name_key). Set inner_radius to turn it into a donut chart.
Basic Usage
Donut Chart
Setinner_radius to a value greater than 0 to hollow out the center. This creates a donut chart, which can feel cleaner and leaves room for a central label or statistic.
Labels
Setshow_label=True to display a label on each slice, making values readable without tooltips.
Spaced Slices
Setpadding_angle to add space between slices, visually separating each segment.
API Reference
PieChart Parameters
Data as a list of dicts, or a
{{ field }} interpolation reference.The data field containing numeric values to plot as slice sizes.
The data field containing labels for each slice.
Chart height in pixels.
Inner radius in pixels. Set greater than 0 for a donut chart.
Show a label on each slice.
Angle in degrees between slices.
Show a legend below the chart.
Show tooltips on hover.
Additional Tailwind CSS classes.
Protocol Reference
PieChart