victory-pie
Version:
Pie Component for Victory
115 lines • 6.7 kB
TypeScript
import React from "react";
import { Data, EventPropTypeInterface, NumberOrCallback, SliceNumberOrCallback, StringOrNumberOrCallback, VictoryCommonProps, VictoryMultiLabelableProps, VictoryStyleInterface, EventsMixinClass, VictoryDatableProps } from "victory-core";
import { SliceProps, VictorySliceTTargetType, VictorySliceLabelPlacementType, VictorySliceLabelPositionType } from "./slice";
export interface VictoryPieProps extends Omit<VictoryCommonProps, "polar">, VictoryDatableProps, VictoryMultiLabelableProps {
cornerRadius?: SliceNumberOrCallback<SliceProps, "cornerRadius">;
endAngle?: number;
events?: EventPropTypeInterface<VictorySliceTTargetType, StringOrNumberOrCallback | string[] | number[]>[];
eventKey?: StringOrNumberOrCallback;
innerRadius?: NumberOrCallback;
labelIndicator?: boolean | React.ReactElement;
labelIndicatorInnerOffset?: number;
labelIndicatorOuterOffset?: number;
labelPlacement?: VictorySliceLabelPlacementType | ((props: SliceProps) => VictorySliceLabelPlacementType);
labelPosition?: VictorySliceLabelPositionType | ((props: SliceProps) => VictorySliceLabelPositionType);
labelIndicatorComponent?: React.ReactElement;
labelRadius?: number | ((props: SliceProps) => number);
padAngle?: NumberOrCallback;
radius?: NumberOrCallback;
startAngle?: number;
style?: VictoryStyleInterface;
}
interface VictoryPieBase extends EventsMixinClass<VictoryPieProps> {
}
declare class VictoryPieBase extends React.Component<VictoryPieProps> {
static animationWhitelist: (keyof VictoryPieProps)[];
static displayName: string;
static role: string;
static defaultTransitions: {
onExit: {
duration: number;
before: () => {
_y: number;
label: string;
};
};
onEnter: {
duration: number;
before: () => {
_y: number;
label: string;
};
after: (datum: any) => {
y_: any;
label: any;
};
};
};
static defaultProps: VictoryPieProps;
static getBaseProps(props: VictoryPieProps): any;
static getData: typeof Data.getData;
static expectedComponents: (keyof VictoryPieProps)[];
shouldAnimate(): boolean;
renderComponents(props: VictoryPieProps, shouldRenderDatum?: (datum: any) => boolean): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
render(): React.ReactElement;
}
export declare const VictoryPie: {
new (props: import("victory-core").EventMixinCommonProps): {
state: {};
getEventState: (eventKey: string | number, namespace: string, childType?: string | undefined) => any;
getScopedEvents: (events: any, namespace: any, childType: any, baseProps: any) => {};
getEvents: (p: any, target: any, eventKey: any) => any;
externalMutations: {} | undefined;
calculatedState: {};
globalEvents: {};
prevGlobalEventKeys: string[];
boundGlobalEvents: {};
shouldComponentUpdate(nextProps: import("victory-core").EventMixinCommonProps): boolean;
componentDidMount(): void;
componentDidUpdate(prevProps: any): void;
componentWillUnmount(): void;
addGlobalListener(key: any): void;
removeGlobalListener(key: any): void;
getStateChanges(props: any): {};
applyExternalMutations(props: any, externalMutations: any): void;
getCalculatedValues(props: any): import("victory-core").EventMixinCalculatedValues;
getExternalMutations(props: import("victory-core").EventMixinCommonProps): {} | undefined;
cacheValues(obj: any): void;
getBaseProps(props: any, getSharedEventState: any): Record<string, object>;
getAllEvents(props: any): any;
getComponentProps(component: React.ReactNode, type: string, index: string | number): any;
renderContainer(component: any, children: any): React.DetailedReactHTMLElement<any, HTMLElement>;
animateComponent(props: import("victory-core").EventMixinCommonProps, defaultAnimationWhitelist: string[]): React.ReactElement;
renderContinuousData(props: import("victory-core").EventMixinCommonProps): React.DetailedReactHTMLElement<any, HTMLElement>;
renderData(props: any, shouldRenderDatum?: (datum: any) => boolean): React.DetailedReactHTMLElement<any, HTMLElement>;
context: unknown;
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("victory-core").EventMixinCommonProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
forceUpdate(callback?: (() => void) | undefined): void;
render(): React.ReactNode;
readonly props: Readonly<import("victory-core").EventMixinCommonProps>;
refs: {
[key: string]: React.ReactInstance;
};
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
getSnapshotBeforeUpdate?(prevProps: Readonly<import("victory-core").EventMixinCommonProps>, prevState: Readonly<{}>): any;
componentWillMount?(): void;
UNSAFE_componentWillMount?(): void;
componentWillReceiveProps?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextState: Readonly<{}>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextState: Readonly<{}>, nextContext: any): void;
componentEvents: Array<import("@/victory-core/lib/victory-util/events").ComponentEvent>;
getSharedEventState: (key: string, value: string) => unknown;
baseProps: Record<string, object>;
dataKeys: string[];
hasEvents: unknown;
events: unknown;
};
getBaseProps?(props: import("victory-core").EventMixinCommonProps): import("victory-core").EventMixinCalculatedValues["baseProps"];
role?: import("victory-core").VictoryComponentRole;
expectedComponents?: string[] | undefined;
getChildren?: ((props: import("victory-core").EventMixinCommonProps, childComponents?: Array<React.ReactNode>, calculatedProps?: import("victory-core").EventMixinCommonProps | undefined) => void) | undefined;
animationWhitelist?: string[] | undefined;
} & typeof VictoryPieBase;
export {};
//# sourceMappingURL=victory-pie.d.ts.map