victory-box-plot
Version:
Box Plot Component for Victory
140 lines • 7.65 kB
TypeScript
import React from "react";
import { EventPropTypeInterface, DomainPropType, DomainPaddingPropType, OrientationTypes, StringOrNumberOrCallback, VictoryDatableProps, VictoryCommonProps, VictoryStyleObject, VictoryLabelStyleObject, EventsMixinClass } from "victory-core";
export type VictoryBoxPlotLabelType = boolean | (string | number)[] | {
(): any;
} | {
(data: any): string | null;
};
export interface VictoryBoxPlotStyleInterface {
parent?: VictoryStyleObject;
max?: VictoryStyleObject;
maxLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
min?: VictoryStyleObject;
minLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
median?: VictoryStyleObject;
medianLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
q1?: VictoryStyleObject;
q1Labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
q3?: VictoryStyleObject;
q3Labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
boxes?: VictoryStyleObject;
whiskers?: VictoryStyleObject;
}
export interface VictoryBoxPlotLabelOrientationInterface {
max?: OrientationTypes;
min?: OrientationTypes;
median?: OrientationTypes;
q1?: OrientationTypes;
q3?: OrientationTypes;
}
export interface VictoryBoxPlotProps extends VictoryCommonProps, VictoryDatableProps {
boxWidth?: number;
datum?: any;
domain?: DomainPropType;
domainPadding?: DomainPaddingPropType;
events?: EventPropTypeInterface<string, StringOrNumberOrCallback>[];
eventKey?: StringOrNumberOrCallback;
horizontal?: boolean;
labelOrientation?: OrientationTypes | VictoryBoxPlotLabelOrientationInterface;
labels?: boolean;
max?: StringOrNumberOrCallback | string[];
maxComponent?: React.ReactElement;
maxLabelComponent?: React.ReactElement;
maxLabels?: VictoryBoxPlotLabelType;
median?: StringOrNumberOrCallback | string[];
medianComponent?: React.ReactElement;
medianLabelComponent?: React.ReactElement;
medianLabels?: VictoryBoxPlotLabelType;
min?: StringOrNumberOrCallback | string[];
minComponent?: React.ReactElement;
minLabelComponent?: React.ReactElement;
minLabels?: VictoryBoxPlotLabelType;
q1?: StringOrNumberOrCallback | string[];
q1Component?: React.ReactElement;
q1LabelComponent?: React.ReactElement;
q1Labels?: VictoryBoxPlotLabelType;
q3?: StringOrNumberOrCallback | string[];
q3Component?: React.ReactElement;
q3LabelComponent?: React.ReactElement;
q3Labels?: VictoryBoxPlotLabelType;
style?: VictoryBoxPlotStyleInterface;
text?: StringOrNumberOrCallback | string[];
whiskerWidth?: number;
}
interface VictoryBoxPlotBase extends EventsMixinClass<VictoryBoxPlotProps> {
}
declare class VictoryBoxPlotBase extends React.Component<VictoryBoxPlotProps> {
static animationWhitelist: Array<keyof VictoryBoxPlotProps>;
static displayName: string;
static role: string;
static defaultTransitions: import("victory-core").AnimatePropTypeInterface;
static defaultProps: VictoryBoxPlotProps;
static getDomain(props: any, axis: any): any;
static getData(props: any): any;
static getBaseProps(props: any): any;
static expectedComponents: Array<keyof VictoryBoxPlotProps>;
renderBoxPlot(props: any): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
shouldAnimate(): boolean;
shouldRenderDatum(datum: any): boolean;
render(): React.ReactElement;
}
export declare const VictoryBoxPlot: {
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 VictoryBoxPlotBase;
export {};
//# sourceMappingURL=victory-box-plot.d.ts.map