Open rainit2006 opened 6 years ago
注意点:
其他链接: https://github.com/rainit2006/My_AWS-Cloud/issues/20
完整的sample code https://www.tutorialspoint.com/highcharts/highcharts_line_basic.htm
从外部json文件里读取数据的代码例子:
$.getJSON(
'https://cdn.rawgit.com/highcharts/highcharts/v6.0.5/samples/data/range.json',
function (data) {
Highcharts.chart('container', {
chart: {
type: 'arearange',
zoomType: 'x'
},
title: {
text: 'Temperature variation by day'
},
xAxis: {
type: 'datetime'
},
yAxis: {
title: {
text: null
}
},
tooltip: {
crosshairs: true,
shared: true,
valueSuffix: '°C'
},
legend: {
enabled: false
},
series: [{
name: 'Temperatures',
data: data
}]
});
}
);