vis.js实现一个时间排班任务图表效果代码
代码语言:html
所属分类:图表
代码描述:vis.js实现一个时间排班任务图表效果代码,基于时间线和时间节点的排班表。
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/vis.4.21.0.css"> <style> body, html { font-family: arial, sans-serif; font-size: 11pt; } #visualization { box-sizing: border-box; width: 100%; height: 300px; } </style> </head> <body> <button id="collapse-extend" data-value="allGroups-hidden" onclick="showHideAllGroups(this)">Show/hide all nested groups</button> <div id="visualization"></div> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/moment.2.29.1.js"></script> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/vis.4.21.0.js"></script> <script > var now = moment().minutes(0).seconds(0).milliseconds(0); var itemCount = 60; // create a data set with groups var groups = new vis.DataSet(); groups.add([{ id: 1, content: "Lee", nestedGroups: [11, 12, 13] }, { id: 2, content: "invisible group", visible: false }, { id: 3, content: "John", nestedGroups: [14], showNested: false }, { id: 4, content: "Alson" }, ]); groups.add([{ id: 11, content: "cook", }, { id: 12, content: "shop", }, { id: 13, content: "clean house", }, { id: 14, content: "wash dishes", } ]); // create a dataset with items var items = new vis.Da.........完整代码请登录后点击上方下载按钮下载查看
网友评论0