apps/www/content/docs/charts/pie-chart.mdx
import { Chart, useChart } from "@chakra-ui/charts"
import { Pie, PieChart } from "recharts"
<Chart.Root>
<PieChart>
<Pie />
</PieChart>
</Chart.Root>
Render the LabelList from recharts inside the Pie to display the label
inside the pie chart.
<Pie>
<LabelList dataKey="name" position="inside" />
</Pie>
Pass the label prop to the Pie component to display the label outside the
pie chart.
<Pie labelLine={false} label={({ name, value }) => `${name}: ${value}`}>
</Pie>
Set the stroke prop to none to remove the stroke from the pie chart.
Render the Chart.Legend component to display a legend for the pie chart.
Here's an example of how to add point labels.
<ExampleTabs name="charts/pie-chart-with-point-label" />Set the startAngle and endAngle props to the desired start and end angles
for the pie chart.
<Pie startAngle={180} endAngle={0}>
</Pie>