import { Pie, PieChart } from 'recharts';
import { RechartsDevtools } from '@recharts/devtools';
// #region Sample data
const data = [
{ name: 'Group A', value: 400 },
{ name: 'Group B', value: 300 },
{ name: 'Group C', value: 300 },
{ name: 'Group D', value: 200 },
{ name: 'Group E', value: 278 },
{ name: 'Group F', value: 189 },
];
// #endregion
export default function StraightAnglePieChart({ isAnimationActive = true }: { isAnimationActive?: boolean }) {
return (
<PieChart style={{ width: '100%', maxWidth: '500px', maxHeight: '80vh', aspectRatio: 2 }} responsive>
<Pie
dataKey="value"
startAngle={180}
endAngle={0}
data={data}
cx="50%"
cy="100%"
outerRadius="120%"
label
isAnimationActive={isAnimationActive}
/>
<RechartsDevtools />
</PieChart>
);
}