react-financial-charts
Version:
React charts specific to finance.
83 lines (82 loc) • 2.49 kB
TypeScript
import * as React from "react";
import { strokeDashTypes } from "../utils";
interface TrendLineProps {
readonly snap: boolean;
readonly enabled: boolean;
readonly snapTo?: any;
readonly shouldDisableSnap: any;
readonly onStart: any;
readonly onComplete: any;
readonly onSelect?: any;
readonly currentPositionStroke?: string;
readonly currentPositionStrokeWidth?: number;
readonly currentPositionstrokeOpacity?: number;
readonly currentPositionRadius?: number;
readonly type: "XLINE" | // extends from -Infinity to +Infinity
"RAY" | // extends to +/-Infinity in one direction
"LINE";
readonly hoverText: object;
readonly trends: any[];
readonly appearance: {
stroke: string;
strokeOpacity: number;
strokeWidth: number;
strokeDasharray: strokeDashTypes;
edgeStrokeWidth: number;
edgeFill: string;
edgeStroke: string;
};
}
interface TrendLineState {
current?: any;
override?: any;
trends?: any;
}
export declare class TrendLine extends React.Component<TrendLineProps, TrendLineState> {
static defaultProps: {
type: string;
onStart: () => void;
onComplete: () => void;
onSelect: () => void;
currentPositionStroke: string;
currentPositionstrokeOpacity: number;
currentPositionStrokeWidth: number;
currentPositionRadius: number;
shouldDisableSnap: (e: any) => any;
hoverText: {
enable: boolean;
bgHeight: string;
bgWidth: string;
text: string;
selectedText: string;
fontFamily: string;
fontSize: number;
fill: string;
bgFill: string;
bgOpacity: number;
};
trends: never[];
appearance: {
stroke: string;
strokeOpacity: number;
strokeWidth: number;
strokeDasharray: string;
edgeStrokeWidth: number;
edgeFill: string;
edgeStroke: string;
r: number;
};
};
private getSelectionState;
private mouseMoved;
private saveNodeType;
private terminate;
constructor(props: TrendLineProps);
render(): JSX.Element;
private readonly handleEnd;
private readonly handleStart;
private readonly handleDrawLine;
private readonly handleDragLineComplete;
private readonly handleDragLine;
}
export {};