jQuery的浮点X轴时间 [英] jquery flot xaxis time
本文介绍了jQuery的浮点X轴时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在此示例中,xaxis将比较日期...
In this example in xaxis will compare the days...
$.plot($("#placeholder"), data, {
yaxis: {},
xaxis: { mode: "time",minTickSize: [1, "day"],timeformat: "%d/%m/%y"},"lines": {"show": "true"},"points": {"show": "true"},clickable:true,hoverable: true
});
我如何打印时间?
这是我想要的结果:
22:00 23:00 00:00 01:00 02:00 ...... 23:00 00:00 01:00 02:00 .... 06:00
有可能吗?
推荐答案
$.plot($("#placeholder"), data, {
yaxis: {
},
xaxis: { mode: "time",minTickSize: [1, "hour"],
min: (new Date("2000/01/01")).getTime(),
max: (new Date("2000/01/02")).getTime()
},
"lines": {"show": "true"},
"points": {"show": "true"},
clickable:true,hoverable: true
});
以此为起点,您可以在这里 http://jsfiddle.net/UEePE/
use this as a starting point and you can see the result here http://jsfiddle.net/UEePE/
这篇关于jQuery的浮点X轴时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文