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