1 |
|
2 |
|
3 |
|
4 | import React, { CSSProperties, ReactNode } from 'react';
|
5 | export type TooltipType = 'none';
|
6 | export type ValueType = number | string | Array<number | string>;
|
7 | export type NameType = number | string;
|
8 | export type Formatter<TValue extends ValueType, TName extends NameType> = (value: TValue, name: TName, item: Payload<TValue, TName>, index: number, payload: Array<Payload<TValue, TName>>) => [React.ReactNode, TName] | React.ReactNode;
|
9 | export interface Payload<TValue extends ValueType, TName extends NameType> {
|
10 | type?: TooltipType;
|
11 | color?: string;
|
12 | formatter?: Formatter<TValue, TName>;
|
13 | name?: TName;
|
14 | value?: TValue;
|
15 | unit?: ReactNode;
|
16 | dataKey?: string | number;
|
17 | payload?: any;
|
18 | chartType?: string;
|
19 | stroke?: string;
|
20 | strokeDasharray?: string | number;
|
21 | strokeWidth?: number | string;
|
22 | className?: string;
|
23 | hide?: boolean;
|
24 | }
|
25 | export interface Props<TValue extends ValueType, TName extends NameType> {
|
26 | separator?: string;
|
27 | wrapperClassName?: string;
|
28 | labelClassName?: string;
|
29 | formatter?: Formatter<TValue, TName>;
|
30 | contentStyle?: CSSProperties;
|
31 | itemStyle?: CSSProperties;
|
32 | labelStyle?: CSSProperties;
|
33 | labelFormatter?: (label: any, payload: Array<Payload<TValue, TName>>) => ReactNode;
|
34 | label?: any;
|
35 | payload?: Array<Payload<TValue, TName>>;
|
36 | itemSorter?: (item: Payload<TValue, TName>) => number | string;
|
37 | accessibilityLayer?: boolean;
|
38 | }
|
39 | export declare const DefaultTooltipContent: <TValue extends ValueType, TName extends NameType>(props: Props<TValue, TName>) => React.JSX.Element;
|