在创建动态系列和数据时,Highstock 导航器总是将 1970-1-1 作为起点显示有问题……有人遇到过这个问题并有一些解决方法吗?
这是一个例子:http: //jsfiddle.net/sokarovski/SRtvn/
var $container = $('.canvas');
var chart = new Highcharts.StockChart({
chart: {
renderTo: $container[0]
},
xAxis: {
type: 'datetime' ,
ordinal: false
}
});
chart.addSeries({
data: [
[Date.UTC(2013,1,1), 0],
[Date.UTC(2013,1,5), 10],
[Date.UTC(2013,1,15), 15],
[Date.UTC(2013,2,5), 20],
[Date.UTC(2013,2,28), 25],
[Date.UTC(2013,3,3), 30],
]
});
//I tried to fix it with this also but it does not help
chart.xAxis[0].setExtremes(Date.UTC(2013,1,1), Date.UTC(2013,3,3));