react-financial-charts
Version:
React charts specific to finance.
65 lines (64 loc) • 2.08 kB
TypeScript
import * as PropTypes from "prop-types";
import * as React from "react";
interface HoverTooltipProps {
readonly chartId?: number | string;
readonly yAccessor?: any;
readonly tooltipSVG?: any;
readonly backgroundShapeSVG?: any;
readonly bgwidth?: number;
readonly bgheight?: number;
readonly bgFill: string;
readonly bgOpacity: number;
readonly tooltipContent: any;
readonly origin: number[] | any;
readonly fontFamily?: string;
readonly fontSize?: number;
}
declare class HoverTooltip extends React.Component<HoverTooltipProps> {
static defaultProps: {
tooltipSVG: typeof defaultTooltipSVG;
tooltipCanvas: typeof defaultTooltipCanvas;
origin: typeof defaultOrigin;
fill: string;
bgFill: string;
bgOpacity: number;
stroke: string;
fontFill: string;
opacity: number;
backgroundShapeSVG: typeof defaultBackgroundShapeSVG;
backgroundShapeCanvas: typeof defaultBackgroundShapeCanvas;
fontFamily: string;
fontSize: number;
};
static contextTypes: {
margin: PropTypes.Validator<object>;
ratio: PropTypes.Validator<number>;
};
render(): JSX.Element;
private readonly renderSVG;
private readonly drawOnCanvas;
}
declare function defaultBackgroundShapeSVG({ fill, stroke, opacity }: {
fill: any;
stroke: any;
opacity: any;
}, { height, width }: {
height: any;
width: any;
}): JSX.Element;
declare function defaultTooltipSVG({ fontFamily, fontSize, fontFill }: {
fontFamily: any;
fontSize: any;
fontFill: any;
}, content: any): JSX.Element;
declare function defaultBackgroundShapeCanvas(props: any, { width, height }: {
width: any;
height: any;
}, ctx: any): void;
declare function defaultTooltipCanvas({ fontFamily, fontSize, fontFill }: {
fontFamily: any;
fontSize: any;
fontFill: any;
}, content: any, ctx: any): void;
declare function defaultOrigin(props: any, moreProps: any, bgSize: any, pointWidth: any): any[];
export default HoverTooltip;