recharts
Version:
React charts
53 lines (52 loc) • 1.56 kB
TypeScript
/**
* @fileOverview Cross
*/
import * as React from 'react';
import { SVGProps } from 'react';
interface CrossProps {
/**
* The x-coordinate of the vertical line of the cross in pixels.
*/
x?: number;
/**
* The y-coordinate of the horizontal line of the cross in pixels.
*/
y?: number;
/**
* Width of the cross in pixels.
*/
width?: number;
/**
* Height of the cross in pixels.
*/
height?: number;
/**
* The y-coordinate of the top left point in the boundary box of the cross.
*/
top?: number;
/**
* The x-coordinate of the top left point in the boundary box of the cross.
*/
left?: number;
className?: number;
}
/**
* @public
*/
export type Props = SVGProps<SVGPathElement> & CrossProps;
/**
* Renders a crosshair as an SVG path with one horizontal and one vertical line.
* It is used as the default tooltip cursor in {@link ScatterChart}.
*
* All coordinates and dimensions are in pixels, rather than chart data values.
* The vertical line runs from `(x, top)` to `(x, top + height)`, and the horizontal line
* runs from `(left, y)` to `(left + width, y)`. Set `top`, `left`, `width`, and `height`
* to define the extent of the lines; `x` and `y` position their intersection.
*
* Use SVG presentation attributes such as `stroke`, `strokeWidth`, and `strokeDasharray`
* to style the lines. Set `stroke` to make the path visible; `fill` does not color the lines.
*
* @public
*/
export declare const Cross: React.FC<Props>;
export {};