react-financial-charts
Version:
React charts specific to finance.
104 lines (103 loc) • 3.64 kB
TypeScript
import * as React from "react";
interface EventCaptureProps {
readonly mouseMove: boolean;
readonly zoom: boolean;
readonly pan: boolean;
readonly panSpeedMultiplier: number;
readonly focus: boolean;
readonly useCrossHairStyleCursor?: boolean;
readonly width: number;
readonly height: number;
readonly chartConfig: Array<{
origin: number[];
height: number;
}>;
readonly xAccessor: any;
readonly xScale: any;
readonly disableInteraction: boolean;
readonly getAllPanConditions: () => Array<{
panEnabled: boolean;
draggable: boolean;
}>;
readonly onMouseMove?: (touchXY: number[], eventType: string, event: React.TouchEvent) => void;
readonly onMouseEnter?: (event: any) => void;
readonly onMouseLeave?: (event: React.MouseEvent) => void;
readonly onZoom?: (zoomDir: 1 | -1, mouseXY: number[], event: React.WheelEvent) => void;
readonly onPinchZoom?: any;
readonly onPinchZoomEnd: any;
readonly onPan?: any;
readonly onPanEnd?: any;
readonly onDragStart?: (details: {
startPos: number[];
}, event: React.MouseEvent) => void;
readonly onDrag?: (details: {
startPos: number[];
mouseXY: number[];
}, event: React.MouseEvent) => void;
readonly onDragComplete?: (details: {
mouseXY: number[];
}, event: React.MouseEvent) => void;
readonly onClick?: (mouseXY: number[], event: React.MouseEvent) => void;
readonly onDoubleClick?: (mouseXY: number[], event: React.MouseEvent) => void;
readonly onContextMenu?: (mouseXY: number[], event: React.MouseEvent) => void;
readonly onMouseDown?: (mouseXY: number[], currentCharts: any, event: React.MouseEvent) => void;
}
interface EventCaptureState {
cursorOverrideClass?: string;
dragInProgress?: boolean;
dragStartPosition?: any;
panInProgress: boolean;
panStart?: any;
pinchZoomStart?: any;
}
export declare class EventCapture extends React.Component<EventCaptureProps, EventCaptureState> {
static defaultProps: {
mouseMove: boolean;
zoom: boolean;
pan: boolean;
panSpeedMultiplier: number;
focus: boolean;
onDragComplete: () => void;
disableInteraction: boolean;
};
private clicked?;
private dx;
private dy;
private dragHappened?;
private focus?;
private lastNewPos?;
private mouseInside;
private mouseInteraction;
private panEndTimeout?;
private panHappened?;
private readonly ref;
constructor(props: EventCaptureProps);
componentDidMount(): void;
componentDidUpdate(): void;
componentWillUnmount(): void;
readonly handleEnter: () => void;
handleLeave: (e: any) => void;
handleWheel: (e: React.WheelEvent<Element>) => void;
queuePanEnd(): void;
handleMouseMove: () => void;
handleClick: (e: React.MouseEvent<Element, MouseEvent>) => void;
handleRightClick: (e: React.MouseEvent<Element, MouseEvent>) => void;
handleDrag: () => void;
cancelDrag(): void;
handleDragEnd: () => void;
canPan: () => {
panEnabled: boolean;
somethingSelected: boolean;
};
handleMouseDown: (e: React.MouseEvent<Element, MouseEvent>) => void;
shouldPan: () => boolean;
handlePan: () => void;
handlePanEnd: () => void;
handleTouchMove: (e: React.TouchEvent<Element>) => void;
handleTouchStart: (e: React.TouchEvent<Element>) => void;
handlePinchZoom: () => void;
handlePinchZoomEnd: () => void;
setCursorClass: (cursorOverrideClass: any) => void;
render(): JSX.Element;
}
export {};