UNPKG

1.82 kBTypeScriptView Raw
1import React, { ReactElement } from 'react';
2import { ImplicitLabelType } from '../component/Label';
3import { IfOverflow } from '../util/IfOverflowMatches';
4import { Props as RectangleProps } from '../shape/Rectangle';
5import { CartesianViewBox, D3Scale } from '../util/types';
6import { Props as XAxisProps } from './XAxis';
7import { Props as YAxisProps } from './YAxis';
8interface InternalReferenceAreaProps {
9 viewBox?: CartesianViewBox;
10 xAxis?: Omit<XAxisProps, 'scale'> & {
11 scale: D3Scale<string | number>;
12 };
13 yAxis?: Omit<YAxisProps, 'scale'> & {
14 scale: D3Scale<string | number>;
15 };
16 clipPathId?: number | string;
17}
18interface ReferenceAreaProps extends InternalReferenceAreaProps {
19 isFront?: boolean;
20 alwaysShow?: boolean;
21 ifOverflow?: IfOverflow;
22 x1?: number | string;
23 x2?: number | string;
24 y1?: number | string;
25 y2?: number | string;
26 className?: number | string;
27 yAxisId?: number | string;
28 xAxisId?: number | string;
29 shape?: ReactElement<SVGElement> | ((props: any) => ReactElement<SVGElement>);
30 label?: ImplicitLabelType;
31}
32export type Props = RectangleProps & ReferenceAreaProps;
33export declare function ReferenceArea(props: Props): React.JSX.Element;
34export declare namespace ReferenceArea {
35 var displayName: string;
36 var defaultProps: {
37 isFront: boolean;
38 ifOverflow: string;
39 xAxisId: number;
40 yAxisId: number;
41 r: number;
42 fill: string;
43 fillOpacity: number;
44 stroke: string;
45 strokeWidth: number;
46 };
47 var renderRect: (option: React.ReactElement<SVGElement, string | React.JSXElementConstructor<any>> | ((props: any) => React.ReactElement<SVGElement, string | React.JSXElementConstructor<any>>), props: any) => React.JSX.Element;
48}
49export {};