@react-financial-charts/interactive
Version:
Interactive features for react-financial-charts
36 lines (35 loc) • 1.04 kB
TypeScript
import * as React from "react";
import { strokeDashTypes } from "@react-financial-charts/core";
interface BrushProps {
readonly enabled: boolean;
readonly onBrush: ({ start, end }: any, moreProps: any) => void;
readonly type?: "1D" | "2D";
readonly strokeStyle?: string;
readonly fillStyle?: string;
readonly interactiveState: object;
readonly strokeDashArray?: strokeDashTypes;
}
interface BrushState {
end?: any;
rect: any | null;
selected?: boolean;
start?: any;
x1y1?: any;
}
export declare class Brush extends React.Component<BrushProps, BrushState> {
static defaultProps: {
type: string;
strokeStyle: string;
fillStyle: string;
strokeDashArray: string;
};
private zoomHappening?;
constructor(props: BrushProps);
terminate(): void;
render(): JSX.Element | null;
private readonly drawOnCanvas;
private readonly handleZoomStart;
private readonly handleDrawSquare;
private readonly handleZoomComplete;
}
export {};