Extend datatype to [number, number, number]

This commit is contained in:
Lise Petersen
2018-09-25 15:44:06 +02:00
parent b060cd96b9
commit feaacbbde7
2 changed files with 29 additions and 1 deletions

View File

@@ -5767,8 +5767,10 @@ declare namespace Highcharts {
* name: 'Point1',
* color: '#FF00FF'
* }]
*
* 4. An array of arrays with three values for ranges. In this case the values correspond x, yMin and yMax.
*/
data?: Array<number | [number, number] | [string, number] | DataPoint>;
data?: Array<number | [number, number] | [string, number] | [string, number, number] | [number, number, number] | DataPoint>;
/**
* A description of the series to add to the screen reader information about the series.
* @since 5.0.0

View File

@@ -109,6 +109,32 @@ function originalTests() {
}]
});
const chart3 = new Highcharts.Chart({
chart: {
renderTo: "container"
},
xAxis: {},
series: [<Highcharts.ColumnRangeChartSeriesOptions> {
data: [[1, 1, 2], [2, 2, 3], [3, 2, 3]],
description: "foo",
type: "columnrange",
allowPointSelect: true
}]
});
const chart4 = new Highcharts.Chart({
chart: {
renderTo: "container"
},
xAxis: {},
series: [<Highcharts.ColumnRangeChartSeriesOptions> {
data: [["01-01-2018", 1, 2], ["02-01-2018", 2, 3], ["03-01-2018", 2, 3]],
description: "column range data",
type: "columnrange",
allowPointSelect: true
}]
});
const div: HTMLDivElement = null as any;
const r = new Highcharts.Renderer(div, 20, 30);
const box = r.text("Hello", 10, 10).getBBox();