UNPKG

1.65 kBTypeScriptView Raw
1/**
2 * @fileOverview Reference Dot
3 */
4import React, { ReactElement } from 'react';
5import { Props as DotProps } from '../shape/Dot';
6import { ImplicitLabelType } from '../component/Label';
7import { IfOverflow } from '../util/IfOverflowMatches';
8import { D3Scale } from '../util/types';
9import { Props as XAxisProps } from './XAxis';
10import { Props as YAxisProps } from './YAxis';
11interface InternalReferenceDotProps {
12 xAxis?: Omit<XAxisProps, 'scale'> & {
13 scale: D3Scale<string | number>;
14 };
15 yAxis?: Omit<YAxisProps, 'scale'> & {
16 scale: D3Scale<string | number>;
17 };
18 clipPathId?: number | string;
19}
20interface ReferenceDotProps extends InternalReferenceDotProps {
21 r?: number;
22 isFront?: boolean;
23 /** @deprecated use ifOverflow="extendDomain" */
24 alwaysShow?: boolean;
25 ifOverflow?: IfOverflow;
26 x?: number | string;
27 y?: number | string;
28 className?: number | string;
29 yAxisId?: number | string;
30 xAxisId?: number | string;
31 shape?: ReactElement<SVGElement> | ((props: any) => ReactElement<SVGElement>);
32 label?: ImplicitLabelType;
33}
34export type Props = DotProps & ReferenceDotProps;
35export declare class ReferenceDot extends React.Component<Props> {
36 static displayName: string;
37 static defaultProps: {
38 isFront: boolean;
39 ifOverflow: string;
40 xAxisId: number;
41 yAxisId: number;
42 r: number;
43 fill: string;
44 stroke: string;
45 fillOpacity: number;
46 strokeWidth: number;
47 };
48 static renderDot: (option: Props['shape'], props: any) => React.JSX.Element;
49 render(): React.JSX.Element;
50}
51export {};