diff --git a/packages/victory-pie/src/index.d.ts b/packages/victory-pie/src/index.d.ts index 056419940..5f14adbaa 100644 --- a/packages/victory-pie/src/index.d.ts +++ b/packages/victory-pie/src/index.d.ts @@ -1,26 +1,25 @@ import * as React from "react"; import { + CategoryPropType, ColorScalePropType, DataGetterPropType, EventPropTypeInterface, + NumberOrCallback, + OriginType, SliceNumberOrCallback, StringOrNumberOrCallback, VictoryCommonProps, + VictoryLabelableProps, VictoryMultiLabelableProps, VictoryStyleInterface } from "victory-core"; +export type labelPositionType = "startAngle" | "centroid" | "endAngle"; + export interface VictorySliceProps extends VictoryCommonProps { cornerRadius?: SliceNumberOrCallback; datum?: any; - innerRadius?: - | number - | (( - props: { - active?: boolean; - datum?: any; - } - ) => number); + innerRadius?: NumberOrCallback; padAngle?: SliceNumberOrCallback; pathComponent?: React.ReactElement; pathFunction?: (props: VictorySliceProps) => string; @@ -35,22 +34,27 @@ export interface VictorySliceProps extends VictoryCommonProps { sliceStartAngle?: SliceNumberOrCallback; } -export interface VictoryPieProps extends VictoryCommonProps, VictoryMultiLabelableProps { +export interface VictoryPieProps + extends VictoryCommonProps, + VictoryLabelableProps, + VictoryMultiLabelableProps { + categories?: CategoryPropType; colorScale?: ColorScalePropType; + cornerRadius?: SliceNumberOrCallback; data?: any[]; dataComponent?: React.ReactElement; - labelPosition?: "startAngle" | "centroid" | "endAngle" | ((props: VictorySliceProps) => string); - labelRadius?: number | ((props: VictorySliceProps) => number); endAngle?: number; events?: EventPropTypeInterface< "data" | "labels" | "parent", StringOrNumberOrCallback | string[] | number[] >[]; eventKey?: StringOrNumberOrCallback; - radius?: number | ((props: VictorySliceProps) => number); - innerRadius?: number | ((props: VictorySliceProps) => number); - cornerRadius?: number; - padAngle?: number; + innerRadius?: NumberOrCallback; + labelPosition?: labelPositionType | ((props: VictorySliceProps) => labelPositionType); + labelRadius?: number | ((props: VictorySliceProps) => number); + origin?: OriginType; + padAngle?: NumberOrCallback; + radius?: NumberOrCallback; startAngle?: number; style?: VictoryStyleInterface; x?: DataGetterPropType;