我的 JSON 看起来像
[{"target": "sumSeries(integral(org.example.fib.hi.value),integral(org.example.fib.hi1.value))",
"datapoints":
[
[2, 1359214560],
[3, 1359215040],
[4, 1359215050],
[null, 1359215060],
[null, 1359215070],
[5, 1359215080],
[7, 1359215090],
[9, 1359215100],
[10, 1359215110],
[null, 1359215120],
[10, 1359215130],
[14, 1359215140],
[null, 1359215150]
]}
]
我正在尝试从我的本地主机中获取这些数据并让 highcharts 呈现折线图。我有类似的东西:
$(function() {
$.getJSON('http://localhost/render?target=sumSeries(integral(org.example.fib.*.value))&from=-10minutes&format=json', function(data) {
// Create the chart
window.chart = new Highcharts.StockChart({
chart : {
renderTo : 'container'
},
rangeSelector : {
selected : 1
},
plotOptions: {
series: {
stacking: 'normal'
}
},
series : [{
name : 'AAPL',
data : data,
tooltip: {
yDecimals: 2
}
}]
});
});
});
如何解析这些数据?