我有一个要渲染的数据集,这主要是为了探索控件。但是,我注意到如果我渲染的数据只跨越几个小时,图表将不会绘制任何东西。如果我在几天内跨越数据,那么它将绘制。我已经尝试调整两者tickInterval (5)
,pointInterval (3600 * 1000)
但我似乎无法让它绘制出来。任何人都可以提供任何可能的建议吗?谢谢!
window.chart = new Highcharts.StockChart({
chart: {
renderTo: 'container',
zoomType: 'x'
},
rangeSelector: {
selected: 1
},
title: {
text: 'AAPL Stock Price'
},
xAxis: {
type: 'datetime',
pointInterval: 1000
},
series: [{
name: 'AAPL Stock Price',
data: [
[Date.UTC(2006, 0, 29, 0, 0, 0), 30.14],
[Date.UTC(2006, 0, 29, 0, 0, 0), 33.11],
[Date.UTC(2006, 0, 29, 1, 0, 0), 34.76],
[Date.UTC(2006, 0, 29, 1, 0, 0), 23.12],
[Date.UTC(2006, 0, 29, 2, 0, 0), 34.34],
[Date.UTC(2006, 0, 29, 2, 0, 0), 34.48],
[Date.UTC(2006, 0, 29, 3, 0, 0), 33.9],
[Date.UTC(2006, 0, 29, 3, 0, 0), 14.72]
]
}]
});