如果我在X轴上创建一个带有日期时间数据标签的图表,并且日期的月份不是一月份,则刻度显示错误的对齐并显示错误的值。
$(function () {
$('#container').highcharts({
chart: {
type: "column"
},
xAxis: {
type: 'datetime',
minTickInterval: 24 * 60 * 60 * 1000 * 30
},
series: [{
pointInterval: 24 * 60 * 60 * 1000 * 30,
data: [
//with month = 0 works well
//[Date.UTC(2010, 0, 1), 29.9],
//[Date.UTC(2011, 0, 1), 176.0],
//[Date.UTC(2012, 0, 1), 176.0]
[Date.UTC(2010, 11, 1), 29.9],
[Date.UTC(2011, 11, 1), 176.0],
[Date.UTC(2012, 11, 1), 176.0]
]
}]
});
});
答案 0 :(得分:3)