Merge pull request #24253 from Zwartpet/highcharts-fix

Fix array definitions for highcharts gauge
This commit is contained in:
Arthur Ozga
2018-03-15 12:19:03 -07:00
committed by GitHub
2 changed files with 9 additions and 3 deletions

View File

@@ -961,7 +961,7 @@ declare namespace Highcharts {
* Use this in cases where a linear gradient between a minColor and maxColor is not sufficient.
* The stops is an array of tuples, where the first item is a float between 0 and 1 assigning the relative position in the gradient, and the second item is the color.
*/
stops?: Array<[number, string]>;
stops?: Array<Array<number|string>>;
/**
* The amount of ticks to draw on the axis. This opens up for aligning the ticks of multiple charts or panes within
* a chart. This option overrides the tickPixelInterval option.
@@ -3077,7 +3077,7 @@ declare namespace Highcharts {
* @default ['50%', '50%']
* @since 2.3.0
*/
center?: [number | string, number | string];
center?: Array<number|string>;
/**
* The end angle of the polar X axis or gauge value axis, given in degrees where 0 is north.
* @default startAngle + 360

View File

@@ -1631,12 +1631,18 @@ function test_Gauge() {
type: 'gauge'
},
pane: {
center: ['50%', '85%'],
startAngle: -150,
endAngle: 150
},
yAxis: {
min: 0,
max: 100
max: 100,
stops: [
[0.1, '#DF5353'],
[0.5, '#DDDF0D'],
[0.9, '#55BF3B'],
],
},
plotOptions: {
gauge: {