From e6b4f2333b2a22ec9f9249d90bea079bcbea3939 Mon Sep 17 00:00:00 2001 From: Jeff Kenney Date: Tue, 2 Jan 2018 17:39:09 -0800 Subject: [PATCH] [highcharts] add oneToOne option to chart.update (#22546) --- types/highcharts/index.d.ts | 6 ++++-- types/highcharts/test/index.ts | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/types/highcharts/index.d.ts b/types/highcharts/index.d.ts index f7f3759432..cf13c8720e 100644 --- a/types/highcharts/index.d.ts +++ b/types/highcharts/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Highcharts 5.0.10 +// Type definitions for Highcharts 5.0.13 // Project: http://www.highcharts.com/ // Definitions by: Damiano Gambarotto // Dan Lewi Harkestad @@ -6374,9 +6374,11 @@ declare namespace Highcharts { * See also the responsive option set. Switching between responsive.rules basically runs chart.update under the hood. * @param option A configuration object for the new chart options as defined in the options section of the API. * @param [boolean] redraw Whether to redraw the chart. Defaults to true. + * @param [boolean] oneToOne When true, the series, xAxis and yAxis collections will be updated one to one, and + * items will be either added or removed to match the new updated options. Defaults to false. * @since 5.0.0 */ - update(options: Options, redraw?: boolean): void; + update(options: Options, redraw?: boolean, oneToOne?: boolean): void; /** * This method is deprecated as of 2.0.1. Updating the chart position after a move operation is no longer necessary. * @since 1.2.5 diff --git a/types/highcharts/test/index.ts b/types/highcharts/test/index.ts index 717e875362..609ff56536 100644 --- a/types/highcharts/test/index.ts +++ b/types/highcharts/test/index.ts @@ -2448,6 +2448,9 @@ function test_ChartObject() { const firstXAxis = chart.xAxis[0]; const firstYAxis = chart.yAxis[0]; const legend = chart.legend; + chart.update( {}); + chart.update( {}, true); + chart.update( {}, true, true); } function test_ElementObject() {