Launch sale — 60% off Pro
Contact
ChartPie

Not affiliated with official shadcn/ui. Visit ui.shadcn.com for official docs.

React A pie chart with a label list

A React pie chart with LabelList displaying category names on slices using custom formatter with shadcn/ui and Recharts

Looking to implement shadcn/ui patterns?

Join our Discord community for help from other developers.


Numbers aren't always the story. This React pie chart uses LabelList with a custom formatter to display browser names (Chrome, Safari, Firefox) directly on each slice instead of values. Built with shadcn/ui and Recharts with fill-background text for contrast, category labels make the chart self-documenting—users immediately see what each slice represents without relying on legends, tooltips, or hover states. The formatter function transforms dataKey values through chartConfig for clean labels. Perfect for categorical breakdowns where category identification matters more than exact numbers, brand comparisons, or feature adoption across segments.

Pattern created by @haydenbleasel

Installation

Questions you might have