-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
67 lines (61 loc) · 2.77 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!DOCTYPE HTML>
<html>
<head>
<title>TonyStack</title>
<script src="./node_modules/vis/dist/vis.js"></script>
<link href="./node_modules/vis/dist/vis.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body, html {
font-family: sans-serif;
}
.red {
color: white;
background-color: red;
border-color: darkred;
}
.blue {
background-color: yellowgreen;
}
.yellow {
background-color: papayawhip;
}
</style>
</head>
<body>
<div id="visualization"></div>
<script type="text/javascript">
// DOM element where the Timeline will be attached
var container = document.getElementById('visualization');
// Create a DataSet (allows two way data-binding)
var items = new vis.DataSet([
{id: 0, content: 'item 0', start: '2013-04-21', group: 5},
{id: 1, content: 'item 1', start: '2013-04-20', className: 'red', group: 1},
{id: 2, content: '<a href="https://github.com">GitHub</a>', start: '2013-04-14', group: 1},
{id: 3, content: 'item 3', start: '2013-04-18', end: null, group: 2},
{id: 31, content: 'item 31', start: '2013-04-19', type: 'box', group: 1},
{id: 32, content: 'item 32', start: '2013-04-20', type: 'point', group: 1},
{id: 4, content: 'item 4', start: '2013-04-16', end: '2013-04-19', align: 'center', group: 2},
{id: 41, content: 'item 41', start: '2013-04-17', end: '2013-04-20', type: 'range', group: 1},
{id: 42, content: 'item 42', start: '2013-04-15', end: '2013-04-18', type: 'background', group: 1},
{id: 43, content: 'item 43', start: '2013-04-18', end: '2013-04-21', editable: true, group: 1},
{id: 44, content: 'item 44', start: '2013-04-19', end: '2013-04-22', editable: {remove: true, updateGroup: true, updateTime: true}, group: 2},
{id: 5, content: 'item 5', start: '2013-04-25', title: 'item title', group: 1},
{id: 6, content: 'item 6', start: '2013-04-27', title: '<a href="https://github.com">GitHub</a>', group: 3},
{id: 7, content: 'item 7', start: '2013-04-23', group: 6}
]);
// Create a Groups
var groups = [
{id: 1, content: 'Group 1', className: 'blue', style: 'color: red; background-color: blue;'},
{id: 2, content: 'Group 2', className: 'yellow'},
{id: 3, content: 'Group 3', title: 'title text3'},
{id: 4, content: 'Group 4', title: 'title text4', visible: false},
{id: 5, content: 'Group 5', nestedGroups: [6], showNested: false},
{id: 6, content: 'Group 6'}
]
// Configuration for the Timeline
var options = {};
// Create a Timeline
var timeline = new vis.Timeline(container, items, groups, options);
</script>
</body>
</html>