From f6e09715b08987b73ec26b8da1140969eb2e441e Mon Sep 17 00:00:00 2001 From: tjh Date: Tue, 18 Sep 2018 15:38:34 -0700 Subject: [PATCH] Make this.axis.defaultLabelFormatter accessible from Axis formatter --- types/highcharts/index.d.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/types/highcharts/index.d.ts b/types/highcharts/index.d.ts index 7ad9f1a439..5546dd29e9 100644 --- a/types/highcharts/index.d.ts +++ b/types/highcharts/index.d.ts @@ -59,6 +59,8 @@ declare namespace Highcharts { value: any; isFirst: number; isLast: number; + chart: ChartObject; + axis: AxisObject; } interface AxisLabels { @@ -103,7 +105,8 @@ declare namespace Highcharts { format?: string; /** * Callback JavaScript function to format the label. The value is given by this.value. Additional properties for - * this are axis, chart, isFirst and isLast. + * this are axis, chart, isFirst and isLast. The value of the default label formatter can be retrieved by calling + * this.axis.defaultLabelFormatter.call(this) within the function. * @default function() {return this.value;} */ formatter?(this: AxisLabelFormatterOptions): string; @@ -6248,6 +6251,7 @@ declare namespace Highcharts { * @since 1.2.0 */ addPlotLine(options: PlotLines): void; + defaultLabelFormatter(this: AxisLabelFormatterOptions): string; /** * Get the current extremes for the axis. * @since 1.2.0