让我的数据显示在 HighCharts/HighStock 中的最简单方法是什么?我正在从另一个来源填充 javascript 数组,但我不知道如何将我的 javascript 数组数据分配给该系列。我看过其他示例和帖子,但我就是不明白。任何有用的指针或教程链接将不胜感激。
arClosingDates[0] = '2/1/2013'
arClosingDates[1] = '2/2/2013'
arClosingDates[2] = '2/3/2013'
arClosingDates[3] = '2/4/2013'
arClosingDates[4] = '2/5/2013'
arClosingPrices[0] = 3.23
arClosingPrices[1] = 3.28
arClosingPrices[2] = 3.56
arClosingPrices[3] = 3.90
arClosingPrices[4] = 3.23
$('#Chart1').highcharts('StockChart', {
rangeSelector : {
selected : 1
},
title : {
text : 'Test Stock Price'
},
series : [{
name : 'Test',
data : [arClosingDates[],arClosingPrices[]],
tooltip: {
valueDecimals: 2
}
}]
});