我有一个Highcharts图表,在数据范围内正确显示数据;但是,当我添加另一个系列并设置比较百分比时,它变为空白。
$(function () {
// Notice that the dataset has missing data
$.getJSON('https://www.highcharts.com/samples/data/jsonp.php?filename=range.json&callback=?', function (data) {
$('#container').highcharts('StockChart', {
chart: {
type: 'areasplinerange'
},
rangeSelector: {
selected: 2
},
title: {
text: 'Temperature variation by day'
},
plotOptions: {
series: {
**compare: 'percent'**
}
},
tooltip: {
valueSuffix: '°C'
},
series: [{
name: 'Temperatures',
data: data
}]
});
});
});
您可以在此处看到示例: Test sample