@react-financial-charts/coordinates
Version:
Coordinates for react-financial-charts
62 lines (61 loc) • 2.2 kB
TypeScript
import * as React from "react";
interface MouseCoordinateXV2Props {
readonly at?: "bottom" | "top";
readonly bg: {
readonly fill: string | ((moreProps: any, ctx: CanvasRenderingContext2D) => string);
readonly stroke: string | ((moreProps: any, ctx: CanvasRenderingContext2D) => string);
readonly strokeWidth: number | ((moreProps: any) => number);
readonly padding: {
left: number;
right: number;
top: number;
bottom: number;
};
};
readonly drawCoordinate: (ctx: CanvasRenderingContext2D, shape: any, props: any, moreProps: any) => void;
readonly displayFormat: (value: number) => string;
readonly dx: number;
readonly dy: number;
readonly orient?: "bottom" | "top";
readonly text: {
readonly fontStyle: string;
readonly fontWeight: string;
readonly fontFamily: string;
readonly fontSize: number;
readonly fill: string | ((moreProps: any, ctx: CanvasRenderingContext2D) => string);
};
readonly xPosition: (props: MouseCoordinateXV2Props, moreProps: any) => number;
}
export declare class MouseCoordinateXV2 extends React.Component<MouseCoordinateXV2Props> {
static defaultProps: {
xPosition: typeof defaultXPosition;
drawCoordinate: typeof defaultDrawCoordinate;
at: string;
orient: string;
text: {
fontStyle: string;
fontWeight: string;
fontFamily: string;
fontSize: number;
fill: string;
};
bg: {
fill: string;
stroke: string;
strokeWidth: number;
padding: {
left: number;
right: number;
top: number;
bottom: number;
};
};
dx: number;
dy: number;
};
render(): JSX.Element;
private readonly drawOnCanvas;
}
declare function defaultXPosition(props: MouseCoordinateXV2Props, moreProps: any): any;
declare function defaultDrawCoordinate(ctx: CanvasRenderingContext2D, shape: any, props: MouseCoordinateXV2Props, moreProps: any): void;
export {};