From b743589ef96dd18497ac1d70c347d3db7b6d196b Mon Sep 17 00:00:00 2001 From: rapmue Date: Mon, 2 Oct 2017 23:25:27 +0200 Subject: [PATCH] [recharts] changed the signature of tickformatter (#20201) Changed the signature of tickformatter function. The changes are based on the issue #19756. --- types/recharts/index.d.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/types/recharts/index.d.ts b/types/recharts/index.d.ts index 311330b06d..b6aa236663 100644 --- a/types/recharts/index.d.ts +++ b/types/recharts/index.d.ts @@ -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, 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 | 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; 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; mirror?: boolean;