@react-financial-charts/interactive
Version:
Interactive features for react-financial-charts
65 lines (64 loc) • 2.11 kB
TypeScript
import * as React from "react";
interface InteractiveTextProps {
readonly onChoosePosition: (e: React.MouseEvent, newText: any, moreProps: any) => void;
readonly onDragComplete?: (e: React.MouseEvent, newTextList: any[], moreProps: any) => void;
readonly onSelect?: (e: React.MouseEvent, interactives: any[], moreProps: any) => void;
readonly defaultText: {
readonly bgFill: string;
readonly bgOpacity: number;
readonly bgStrokeWidth?: number;
readonly bgStroke?: string;
readonly textFill: string;
readonly fontFamily: string;
readonly fontWeight: string;
readonly fontStyle: string;
readonly fontSize: number;
readonly text: string;
};
readonly hoverText: object;
readonly textList: any[];
readonly enabled: boolean;
}
interface InteractiveTextState {
current?: any;
override?: any;
}
export declare class InteractiveText extends React.Component<InteractiveTextProps, InteractiveTextState> {
static defaultProps: {
onSelect: () => void;
defaultText: {
bgFill: string;
bgOpacity: number;
bgStrokeWidth: number;
textFill: string;
fontFamily: string;
fontSize: number;
fontStyle: string;
fontWeight: string;
text: string;
};
hoverText: {
enable: boolean;
bgHeight: string;
bgWidth: string;
text: string;
selectedText: string;
fontFamily: string;
fontSize: number;
fill: string;
bgFill: string;
bgOpacity: number;
};
textList: never[];
};
static contextType: React.Context<import("@react-financial-charts/core").ChartContextType>;
private getSelectionState;
private saveNodeType;
private terminate;
constructor(props: InteractiveTextProps);
render(): JSX.Element;
private readonly handleDraw;
private readonly handleDragComplete;
private readonly handleDrag;
}
export {};