Skip to content

Export PieSectorShapeProps #6705

@artificialWave

Description

@artificialWave

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.

recharts/src/polar/Pie.tsx

Lines 163 to 164 in d3ccaac

type PieSectorShapeProps = PieSectorDataItem & { isActive: boolean; index: number };
type PieShape = ReactNode | ((props: PieSectorShapeProps, index: number) => React.ReactElement);
for reference.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that are feature requeststypescriptPRs or Issues surrounding Types or TS refactoring

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions