react-financial-charts
Version:
React charts specific to finance.
83 lines (82 loc) • 2.27 kB
TypeScript
import * as React from "react";
import { strokeDashTypes } from "../../utils";
interface EachTrendLineProps {
x1Value: any;
x2Value: any;
y1Value: any;
y2Value: any;
index?: number;
type: "XLINE" | // extends from -Infinity to +Infinity
"RAY" | // extends to +/-Infinity in one direction
"LINE";
onDrag: any;
onEdge1Drag: any;
onEdge2Drag: any;
onDragComplete: any;
onSelect: any;
onUnSelect: any;
r: number;
strokeOpacity: number;
defaultClassName?: string;
selected?: boolean;
stroke: string;
strokeWidth: number;
strokeDasharray: strokeDashTypes;
edgeStrokeWidth: number;
edgeStroke: string;
edgeInteractiveCursor: string;
lineInteractiveCursor: string;
edgeFill: string;
hoverText: {
enable: boolean;
fontFamily: string;
fontSize: number;
fill: string;
text: string;
selectedText: string;
bgFill: string;
bgOpacity: number;
bgWidth: number | string;
bgHeight: number | string;
};
}
interface EachTrendLineState {
anchor?: string;
hover?: any;
}
export declare class EachTrendLine extends React.Component<EachTrendLineProps, EachTrendLineState> {
static defaultProps: {
onDrag: () => void;
onEdge1Drag: () => void;
onEdge2Drag: () => void;
onDragComplete: () => void;
onSelect: () => void;
onUnSelect: () => void;
selected: boolean;
edgeStroke: string;
edgeFill: string;
edgeStrokeWidth: number;
r: number;
strokeWidth: number;
strokeOpacity: number;
strokeDasharray: string;
hoverText: {
enable: boolean;
};
};
private dragStart;
private isHover;
private saveNodeType;
constructor(props: any);
render(): JSX.Element;
private readonly handleHover;
private readonly handleEdge2Drag;
private readonly handleEdge1Drag;
private readonly handleDragComplete;
private readonly handleEdge2DragStart;
private readonly handleEdge1DragStart;
private readonly handleLineDrag;
private readonly handleLineDragStart;
}
export declare function getNewXY(moreProps: any): any[];
export {};