@react-financial-charts/interactive
Version:
Interactive features for react-financial-charts
123 lines (122 loc) • 4.08 kB
TypeScript
import * as React from "react";
import { strokeDashTypes } from "@react-financial-charts/core";
interface InteractiveYCoordinateProps {
readonly onChoosePosition: (e: React.MouseEvent, newText: any, moreProps: any) => void;
readonly onDragComplete: (e: React.MouseEvent, newAlertList: any[], moreProps: any, draggedAlert: any) => void;
readonly onSelect?: (e: React.MouseEvent, interactives: any[], moreProps: any) => void;
readonly onDelete?: (e: React.MouseEvent, yCoordinate: any, moreProps: any) => void;
readonly defaultPriceCoordinate: {
readonly bgFill: string;
readonly bgOpacity: number;
readonly stroke: string;
readonly strokeDasharray: strokeDashTypes;
readonly strokeOpacity: number;
readonly strokeWidth: number;
readonly textFill: string;
readonly fontFamily: string;
readonly fontWeight: string;
readonly fontStyle: string;
readonly fontSize: number;
readonly text: string;
readonly textBox: {
readonly height: number;
readonly left: number;
readonly padding: {
left: number;
right: number;
};
readonly closeIcon: {
padding: {
left: number;
right: number;
};
width: number;
};
};
readonly edge: {
readonly stroke: string;
readonly strokeOpacity: number;
readonly strokeWidth: number;
readonly fill: string;
readonly fillOpacity: number;
};
};
readonly hoverText: object;
readonly yCoordinateList: any[];
readonly enabled: boolean;
}
interface InteractiveYCoordinateState {
current?: any;
override?: any;
}
export declare class InteractiveYCoordinate extends React.Component<InteractiveYCoordinateProps, InteractiveYCoordinateState> {
static defaultProps: {
defaultPriceCoordinate: {
bgFill: string;
bgOpacity: number;
stroke: string;
strokeOpacity: number;
strokeDasharray: string;
strokeWidth: number;
textFill: string;
fontFamily: string;
fontSize: number;
fontStyle: string;
fontWeight: string;
text: string;
textBox: {
height: number;
left: number;
padding: {
left: number;
right: number;
};
closeIcon: {
padding: {
left: number;
right: number;
};
width: number;
};
};
edge: {
stroke: string;
strokeOpacity: number;
strokeWidth: number;
fill: string;
fillOpacity: number;
orient: string;
at: string;
arrowWidth: number;
dx: number;
rectWidth: number;
rectHeight: number;
displayFormat: (n: number | {
valueOf(): number;
}) => string;
};
};
hoverText: {
enable: boolean;
bgHeight: number;
bgWidth: number;
text: string;
fontFamily: string;
fontSize: number;
fill: string;
bgFill: string;
bgOpacity: number;
};
yCoordinateList: never[];
};
static contextType: React.Context<import("@react-financial-charts/core").ChartContextType>;
private getSelectionState;
private saveNodeType;
private terminate;
constructor(props: InteractiveYCoordinateProps);
render(): JSX.Element;
private readonly handleDelete;
private readonly handleDragComplete;
private readonly handleDrag;
}
export {};