react-financial-charts
Version:
React charts specific to finance.
42 lines (41 loc) • 1.36 kB
TypeScript
import * as PropTypes from "prop-types";
import * as React from "react";
import { strokeDashTypes } from "../utils";
interface CursorProps {
readonly className?: string;
readonly disableYCursor?: boolean;
readonly opacity?: number;
readonly snapX?: boolean;
readonly stroke?: string;
readonly strokeDasharray?: strokeDashTypes;
readonly useXCursorShape?: boolean;
readonly xCursorShapeFill?: string | any;
readonly xCursorShapeStroke: string | any;
readonly xCursorShapeStrokeDasharray?: strokeDashTypes;
readonly xCursorShapeOpacity?: number;
}
declare class Cursor extends React.Component<CursorProps> {
static defaultProps: {
stroke: string;
opacity: number;
strokeDasharray: string;
snapX: boolean;
customSnapX: (props: CursorProps, moreProps: any) => any;
disableYCursor: boolean;
useXCursorShape: boolean;
xCursorShapeStroke: string;
xCursorShapeOpacity: number;
};
static contextTypes: {
margin: PropTypes.Validator<object>;
ratio: PropTypes.Validator<number>;
};
render(): JSX.Element;
private getXCursorShapeStroke;
private getXCursorShapeFill;
private getXCursorShape;
private getXYCursor;
private readonly drawOnCanvas;
private readonly renderSVG;
}
export default Cursor;