[recharts] changed the signature of tickformatter (#20201)

Changed the signature of tickformatter function.
The changes are based on the issue #19756.
This commit is contained in:
rapmue
2017-10-02 14:25:27 -07:00
committed by Ryan Cavanaugh
parent 69af3a040e
commit b743589ef9
+6 -5
View File
@@ -10,6 +10,7 @@ import * as React from 'react';
export type Percentage = string;
export type RechartsFunction = () => void;
export type TickFormatterFunction = (value: any) => any;
export type LabelFormatter = (label: string | number) => React.ReactNode;
export type TooltipFormatter = (value: string | number | Array<string | number>, name: string,
entry: TooltipPayload, index: number) => React.ReactNode;
@@ -139,7 +140,7 @@ export interface BrushProps {
travellerWidth?: number;
startIndex?: number;
endIndex?: number;
tickFormatter?: RechartsFunction;
tickFormatter?: TickFormatterFunction;
onChange?: RechartsFunction;
}
@@ -379,7 +380,7 @@ export interface PolarAngleAxisProps {
tick?: boolean | any | React.ReactElement<any> | RechartsFunction;
ticks: any[];
orient?: string;
tickFormatter: RechartsFunction;
tickFormatter: TickFormatterFunction;
onClick?: RechartsFunction;
onMouseDown?: RechartsFunction;
onMouseUp?: RechartsFunction;
@@ -413,7 +414,7 @@ export interface PolarRadiusAxisProps {
orientation?: "left" | "right" | "middle";
axisLine?: boolean | any;
tick?: boolean | any | Element | RechartsFunction;
tickFormatter: RechartsFunction;
tickFormatter: TickFormatterFunction;
tickCount?: number;
scale?: ScaleType | RechartsFunction;
onClick?: RechartsFunction;
@@ -763,7 +764,7 @@ export interface XAxisProps {
axisLine?: boolean | any;
tickLine?: boolean | any;
tickSize?: number;
tickFormatter?: RechartsFunction;
tickFormatter?: TickFormatterFunction;
ticks?: any[];
tick?: boolean | any | React.ReactElement<any>;
mirror?: boolean;
@@ -806,7 +807,7 @@ export interface YAxisProps {
tickCount?: number;
tickLine?: boolean | any;
tickSize?: number;
tickFormatter?: RechartsFunction;
tickFormatter?: TickFormatterFunction;
ticks?: any[];
tick?: boolean | any | React.ReactElement<any>;
mirror?: boolean;