我需要創建堆棧條形圖,以顯示一天中的引擎狀態。下面是我想什麼有例如:用於甘特圖的JavaScript/jQuery庫,如圖表
它看起來像一個甘特圖,但可能比正常的甘特圖簡單得多。 我正在尋找支持這種圖表的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
時隙之間的時隙是當發動機處於關閉狀態。
一直在尋找這個很長時間。任何建議將大大appreaciated!
您是否試過[highcharts](http://www.highcharts.com/demo/column-stacked)或[fusioncharts](http://www.fusioncharts.com/demos/gallery /#堆積圖表)? – poncha 2012-07-16 08:17:16
@poncha,我嘗試了highcharts,但不支持這種圖表,所以創建一個像這樣的圖表會有點棘手。我不喜歡使用FusionCharts,因爲它只支持免費版本的Flash。謝謝。 – sozhen 2012-07-16 13:32:29
你可以創建沒有圖例的堆疊酒吧,並單獨創建圖例(如果多數民衆贊成在這個問題)... – poncha 2012-07-16 13:37:35