我试图格式化轴最新数据,使之出现在今年也不过什么都没有发生,我使用dygraph-combined.js
document.getElementById("graphdiv"),
// CSV or path to a CSV file.
"Date,Temperature\n" +
"2014-05-07,75\n" +
"2014-05-15,70\n" +
"2014-05-23,80\n"+
"2014-05-30,72\n" ,{
axes: {
x: {
axisLabelFormatter: function(d, gran) {
return Dygraph.dateAxisFormatter(new Date(d.getTime() + 7200*1000), gran);
}
}
}
}
);