gpt4 book ai didi

用于甘特图的 JavaScript/jQuery 库

转载 作者:行者123 更新时间:2023-11-30 06:40:42 26 4
gpt4 key购买 nike

我需要创建一个堆叠条形图来显示一天中的引擎状态。这是我想要的示例:

enter image description here

它看起来像甘特图,但可能比普通甘特图简单得多。 我非常想寻找支持这种图表的 JavaScript/jQuery 图表库。我知道有很多可用的甘特图库,但想知道哪个库有我想要的图表的选项/设置。

我的数据将采用这种格式:

[
{
"day": "2009-07-13",
"work": ["11:16:35-12:03:12", "12:32:48-13:26:28", "13:39:09-13:39:12", "13:41:03-13:41:05", "14:18:09-24:00:00"]
}, {
"day": "2009-07-14",
"work": ["00:00:00-07:22:25", "07:22:25-07:22:28", "10:10:04-10:10:31", "10:10:32-10:15:33", "10:18:07-10:21:19", "11:04:49-11:06:15", "11:12:50-11:19:05", "11:19:11-11:19:19", "11:45:50-11:51:42", "11:51:43-11:53:55", "14:03:13-14:13:04", "14:23:55-14:31:28", "14:31:28-14:38:00", "14:38:00-14:49:04", "16:34:56-16:44:33", "16:46:37-16:48:10", "16:48:11-24:00:00"]
}, {
"day": "2009-07-15",
"work": ["00:00:00-08:16:23", "09:57:57-10:15:05"]
}, {
"day": "2009-07-16",
"work": ["10:02:40-10:05:56", "10:07:16-10:09:26", "10:09:27-10:09:28", "13:18:31-24:00:00"]
}, {
"day": "2009-07-17",
"work": ["00:00:00-08:56:41", "16:07:58-16:08:23"]
}, {
"day": "2009-07-20",
"work": ["14:44:47-14:48:35", "15:09:14-16:47:06", "16:47:05-16:47:10", "16:47:13-16:47:15", "16:47:16-16:47:20"]
}, {
"day": "2009-07-21",
"work": ["10:52:51-16:37:07"]
}, {
"day": "2009-07-24",
"work": ["14:54:38-16:03:07", "16:16:23-16:35:14", "16:35:17-16:41:22", "16:43:37-23:56:37"]
}, {
"day": "2009-07-25",
"work": ["20:36:34-21:24:28", "21:24:43-23:45:53"]
}, {
"day": "2009-07-26",
"work": ["13:46:59-18:09:09"]
}, {
"day": "2009-07-28",
"work": ["13:48:30-13:51:10", "13:51:18-13:51:27", "13:52:17-14:57:31"]
}, {
"day": "2009-07-29",
"work": ["14:50:15-14:50:16", "15:36:17-15:43:51", "15:53:31-16:29:30", "16:57:50-23:07:28"]
}, {
"day": "2009-07-30",
"work": ["11:25:29-11:41:32", "16:06:37-16:33:09", "21:14:04-21:20:18", "21:53:57-22:18:59"]
}
]

work属性时隙是引擎工作时,work时隙之间的时隙是引擎关闭时。

找了很久了。任何建议将不胜感激!

最佳答案

你可以使用 JavaScript InfoVis Toolkit或制作您自己的自定义渲染器。

也许你可以修改BarChart example , 这样它就会在 y 轴上显示时间。

如果您决定编写自己的控件,那么像 Raphael 这样的库会对你有很大帮助。

总之,它似乎是很简单的控制,所以不需要对Flash、Silverlight等的外部依赖。

关于用于甘特图的 JavaScript/jQuery 库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11500211/

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