Pie Chart

Pie charts provide a quick, intuitive view of proportions, making it easy to compare the relative sizes of categories at a glance.

Props

NameDescriptionTypeRequiredDefault
loadingDisplays a loading skeletonbooleanNofalse
donutGives the chart a hollow centreboolean | numberNofalse
classNameApplies a custom classstringNo-
labelsDisplays axis labelsbooleanNotrue
glowAdds a glow effect around the chartbooleanNotrue
totalSets a maximum value for a progress donut chartnumberNo-
childrenCustom content rendered within the donut centreReactNodeNo-

Note

The total and children props are designed for use with donut charts.

Styling

Custom styling can be applied by targeting the class names below. Each class corresponds to a specific element for precise theming and overrides.

Class NameElement
pie__segment-groupWraps each pie segment and its corresponding label
pie__segmentEach slice of the pie
pie__labelThe label of each segment
pie__label__connectorThe line connecting each segment to its label
pie__trackBackground track under the progress ring on a progress chart
pie__childrenThe element that can be rendered in the center of a donut chart (using the children prop),