gpt4 book ai didi

jquery float x 轴时间

转载 作者:行者123 更新时间:2023-12-03 21:48:52 25 4
gpt4 key购买 nike

在此示例中,xaxis 将比较日期...

$.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

可能吗?

最佳答案

来自Flot的Api官方文档:(参见https://github.com/flot/flot/blob/master/API.md)

  xaxis: {
mode: "time",
timeformat: "%y/%m/%d"
}

这将产生诸如“2000/12/24”之类的刻度标签。下列支持说明符

 %h: hours
%H: hours (left-padded with a zero)
%M: minutes (left-padded with a zero)
%S: seconds (left-padded with a zero)
%d: day of month (1-31), use %0d for zero-padding
%m: month (1-12), use %0m for zero-padding
%y: year (2 digits)
%Y: year (4 digits)
%b: month name (customizable)
%p: am/pm, additionally switches %h/%H to 12 hour instead of 24
%P: AM/PM (uppercase version of %p)

关于jquery float x 轴时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2507235/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com