mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-05 14:59:37 +08:00
Updates dataKey type to allow functions in Lines and Tooltips
This commit is contained in:
4
types/recharts/index.d.ts
vendored
4
types/recharts/index.d.ts
vendored
@@ -401,7 +401,7 @@ export interface LineProps extends EventAttributes, Partial<PresentationAttribut
|
||||
left?: number;
|
||||
width?: number;
|
||||
height?: number;
|
||||
dataKey: string | number; // As the source code states, dataKey will replace valueKey in 1.1.0 and it'll be required (it's already required in current implementation).
|
||||
dataKey: DataKey; // As the source code states, dataKey will replace valueKey in 1.1.0 and it'll be required (it's already required in current implementation).
|
||||
label?: boolean | object | React.ReactElement<any> | LabelProps['content'];
|
||||
points?: Point[];
|
||||
}
|
||||
@@ -782,7 +782,7 @@ export interface TooltipPayload {
|
||||
unit?: string;
|
||||
color?: string;
|
||||
fill?: string;
|
||||
dataKey?: string;
|
||||
dataKey?: DataKey;
|
||||
formatter?: TooltipFormatter;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user