As the function passed into the shape property of a pie chart has a parameter of the PieSectorShapeProps type, it makes sense to export this so we can use this type directly instead of always adding the isActive property manually to PieSectorDataItem, when creating our own functions.
|
type PieSectorShapeProps = PieSectorDataItem & { isActive: boolean; index: number }; |
|
type PieShape = ReactNode | ((props: PieSectorShapeProps, index: number) => React.ReactElement); |
for reference.
As the function passed into the
shapeproperty of a pie chart has a parameter of thePieSectorShapePropstype, it makes sense to export this so we can use this type directly instead of always adding theisActiveproperty manually toPieSectorDataItem, when creating our own functions.recharts/src/polar/Pie.tsx
Lines 163 to 164 in d3ccaac