它应该可以正常工作,请看示例:
数据.json
[{
"name" : "AAPL",
"id":"dataseries",
"data" :[
[1141171200000,69.10],
[1141257600000,69.61],
[1141344000000,67.72],
[1141603200000,65.48],
[1141689600000,66.31],
[1141776000000,65.66],
[1141862400000,63.93],
[1141948800000,63.19],
[1142208000000,65.68],
[1142294400000,67.32],
[1142380800000,66.23],
[1142467200000,64.31],
[1142553600000,64.66],
[1142812800000,63.99],
[1142899200000,61.81],
[1142985600000,61.67],
[1143072000000,60.16],
[1143158400000,59.96],
[1143417600000,59.51],
[1143504000000,58.71],
[1143590400000,62.33],
[1143676800000,62.75],
[1143763200000,62.72]],
"tooltip": {
"yDecimals": 2
}
},{
"type": "flags",
"name": "Flags on axis",
"onSeries": "dataseries",
"data": [{
"x": 1143417600000,
"title": "On axis"
}],
"shape": "squarepin"
}]
和脚本:
$.getJSON('data.json', function(data) {
window.chart = new Highcharts.StockChart({
chart : {
renderTo : 'container'
},
rangeSelector : {
selected : 1
},
plotOptions: {
series: {
stacking: 'normal'
}
},
series : data
});
});