Flot画折线图
参考:
flot 中文详解http://www.cnblogs.com/qiudan/archive/2012/06/13/2547719.html
flot数据格式介绍:http://www.jqueryflottutorial.com/cn/jquery-flot-data-format.html
Q1 x轴时间差8小时
参考jquery flotx轴时间差8小时问题http://lee1177.iteye.com/blog/1564514
var options = { lines: { show: true }, points: { show: true }, grid: { hoverable: true}, xaxis: { mode: "time", timeformat: "%H:%M:%S", tickFormatter: function (val, axis) { var d = new Date(val); return d.toLocaleTimeString();//转为当地时间格式 } } };
注:此处tolocaleTimeString已经过时
Q2 时间戳与Date日期之间的转换
参考:js时间戳怎么转换成日期格式http://www.sufeinet.com/thread-1500-1-1.html
Date.prototy
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
