Skip to Content
✨ QuickCode UI keeps growing! More components, more features, and more ways to make your projects shine. Stay tuned & maybe… hire me or sponsor me 😉 
DocumentationPieChart

PieChart

A responsive pie chart component built on Recharts for visualizing data proportions and distributions.

Install Dependencies

npx
quickcode-ui add PieChart

Examples

Basic

Basic Pie Chart

With Labels

Pie Chart with Labels

Custom Labels

Pie Chart with Custom Labels

With Legend

Pie Chart with Legend

Chrome
Safari
Firefox
Edge
Other

Donut

Donut Chart

Stacked

Stacked Pie Chart

Donut with Text

Donut Chart with Center Text

With Separator

Pie Chart with Separator

Props

ChartContainer

PropTypeDefaultDescription
configChartConfigConfiguration object defining chart colors and labels
childrenReactNodeChart components to render
classNamestringAdditional CSS classes

PieChart

PropTypeDefaultDescription
marginobjectChart margins configuration
classNamestringAdditional CSS classes

Pie

PropTypeDefaultDescription
dataany[]Array of data objects to visualize
dataKeystringKey for accessing values in data objects
nameKeystringKey for accessing names in data objects
cxstring'50%'X coordinate of pie center
cystring'50%'Y coordinate of pie center
innerRadiusnumber0Inner radius for donut charts
outerRadiusnumberOuter radius of the pie
paddingAnglenumber0Padding angle between slices
labelboolean | functionfalseShow labels or custom label renderer
activeIndexnumberIndex of active slice for interactions
activeShapeobjectCustom shape properties for active slice

ChartTooltipContent

PropTypeDefaultDescription
indicator'line' | 'dot' | 'dashed''dot'Visual indicator style
hideLabelbooleanfalseHide the tooltip label
hideIndicatorbooleanfalseHide the visual indicator
classNamestringAdditional CSS classes
Last updated on