forked from StoicLoofah/chronoline.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
105 lines (74 loc) · 3.39 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
<meta name="description" content="Chronoline.js : chronoline.js is a library for making a chronology timeline out of events on a horizontal timescale." />
<title>DIM Timelines before GA</title>
</head>
<body>
<!-- MAIN CONTENT -->
<div id="main_content_wrap" class="outer">
<section id="main_content" class="inner">
<div id="target3" class="timeline-tgt">
<label>Zoom Factor <input id="zoom-factor" type="text" value="1.5"></label><input id="zoom" type="button" value="Zoom" />
<br />
<br />
<br />
</div>
</section>
</div>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="http://cdnjs.cloudflare.com/ajax/libs/qtip2/2.0.1/jquery.qtip.min.css" />
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/qtip2/2.0.1/jquery.qtip.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<link rel="stylesheet" type="text/css" href="chronoline/chronoline.css" />
<script type="text/javascript" src="chronoline/chronoline.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var events = [
{dates: [new Date(2016, 11-1, 1),new Date(2016, 12-1, 9)], title: "Beta Release", section: 1},
{dates: [new Date(2016, 12-1,12),new Date(2016, 12-1,30)], title: "PoC for S/4 Int", section: 3},
{dates: [new Date(2016, 12-1,19),new Date(2016, 12-1,24)], title: "ASE", section: 4},
{dates: [new Date(2017, 5-1, 30),new Date(2017, 6-1, 20)], title: "GA", section: 1}
];
var TAKTs = [
{dates: [new Date(2016, 11, 1), new Date(2016, 11, 2)], title: "TAKT 1", section: 0, attrs: {fill: "#e3f0fe"}},
{dates: [new Date(2016, 11, 7), new Date(2016, 11, 7)], title: "TAKT 1", section: 1, attrs: {fill: "#e3f0fe"}},
{dates: [new Date(2017, 1, 2), new Date(2017, 1, 13)], title: "TAKT 1", section: 2, attrs: {fill: "#e3f0fe"}},
];
// wizz generate sprint
if(true){
var dat = new Date(2016, 11-1, 7);
var lower = 2;
var upper = lower + 13;
for( var i=0; i<20; i++){
var sd = new Date(dat);
dat.setDate(dat.getDate() + 12);
var ed = new Date(dat);
dat.setDate(dat.getDate() + 2);
var vld = (i<lower || i>= upper )?false:true;
TAKTs[i] = {dates: [ sd, ed ], title: vld?"TAKT "+(i-lower+1):"", section: i, attrs: {fill: vld?"#e3f0fe":"#f0f0f0"}};
}
}
TAKTs[3] = {dates: [new Date(2016, 12-1,26),new Date(2016, 12-1,31)], title: "T 2", section: 3, attrs: {fill: "#e3f0fe"}};
var timeline3 = new Chronoline(document.getElementById("target3"), events,
{visibleSpan: DAY_IN_MILLISECONDS * 220,
animated: true,
tooltips: true,
// defaultStartDate: new Date(2016, 11-1, 15),
sections: TAKTs,
sectionLabelAttrs: {'fill': '#997e3d', 'font-weight': 'bold'},
labelInterval: isHalfMonth,
hashInterval: isHalfMonth,
scrollLeft: prevQuarter,
scrollRight: nextQuarter,
floatingSubLabels: false,
});
$('#zoom').click(function() {
timeline3.zoom(parseFloat($('#zoom-factor').val()));
});
});
</script>
</body>
</html>