[highcharts] add oneToOne option to chart.update (#22546)

This commit is contained in:
Jeff Kenney
2018-01-02 17:39:09 -08:00
committed by Mohamed Hegazy
parent 00a0a0f5fe
commit e6b4f2333b
2 changed files with 7 additions and 2 deletions

View File

@@ -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 <https://github.com/damianog>
// Dan Lewi Harkestad <https://github.com/baltie>
@@ -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

View File

@@ -2448,6 +2448,9 @@ function test_ChartObject() {
const firstXAxis = chart.xAxis[0];
const firstYAxis = chart.yAxis[0];
const legend = chart.legend;
chart.update(<Highcharts.Options> {});
chart.update(<Highcharts.Options> {}, true);
chart.update(<Highcharts.Options> {}, true, true);
}
function test_ElementObject() {