forked from tizianoflati/reditools2.0
-
Notifications
You must be signed in to change notification settings - Fork 16
/
template.html
60 lines (52 loc) · 1.79 KB
/
template.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
<!DOCTYPE HTML>
<html>
<head>
<title>Timeline | Basic demo</title>
<style type="text/css">
body, html {
font-family: sans-serif;
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vis/4.21.0/vis.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.21.0/vis.css" rel="stylesheet" type="text/css" />
</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: 'Big period', start: "2018-03-07 17:01:24.975455", end: "2018-03-07 18:15:24.975455", type: "background"},
// {id: 7, content: 'Sub period', start: "2018-03-07 17:10:24.975455", end: "2018-03-07 17:20:24.975455", type: "background"},
// {id: 1, content: 'item 1', title: 'ITEM 1', start: "2018-03-07 17:09:24.975455", end: "2018-03-07 18:10:24.975455", group: 2},
// {id: 2, content: 'item 2', start: '2013-04-14', group: 1},
// {id: 3, content: 'item 3', start: '2013-04-18', group: 1},
// {id: 4, content: 'item 4', start: '2013-04-16', end: '2013-04-19', group: 2},
// {id: 5, content: 'item 5', start: '2013-04-25', group: 2},
// {id: 6, content: 'item 6', start: '2013-04-27', group: 1}
// ]);
var items = new vis.DataSet(
EVENTS_DATA
);
var groups =
GROUPS_DATA
;
// Configuration for the Timeline
var options = {};
// var groups = [];
// var groups = [
// {
// id: 1,
// content: 'Group 1'
// },
// {
// id: 2,
// content: 'Group 2'
// }
// ];
// Create a Timeline
var timeline = new vis.Timeline(container, items, groups, options);
</script>
</body>
</html>