-
Notifications
You must be signed in to change notification settings - Fork 491
/
timeline.html
48 lines (43 loc) · 1.74 KB
/
timeline.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
<html>
<head>
<title>SIMILE Timeline Visualization</title>
<script src="http://api.simile-widgets.org/timeline/2.3.1/timeline-api.js?bundle=true" type="text/javascript"></script>
<script>
var jsonTimeline = %s; //substituted by Python from mailboxes__participants_in_conversations_adapted_for_simile.py
function onLoad() {
var eventSource = new Timeline.DefaultEventSource(0);
var theme = Timeline.ClassicTheme.create();
theme.event.bubble.width = 350;
theme.event.bubble.height = 300;
//XXX: could detect and dynamically set orientation of timeline
var d = Timeline.DateTime.parseGregorianDateTime("2002")
var bandInfos = [
Timeline.createBandInfo({
width: "70%",
intervalUnit: Timeline.DateTime.DAY,
intervalPixels: 100,
eventSource : eventSource,
date : d
}),
Timeline.createBandInfo({
width: "30%",
intervalUnit: Timeline.DateTime.MONTH,
intervalPixels: 600,
eventSource : eventSource,
date : d,
overview : true
})
];
bandInfos[1].syncWith = 0;
bandInfos[1].highlight = true;
var tl = Timeline.create(document.getElementById("tl"), bandInfos);
eventSource.loadJSON(jsonTimeline, document.location.href);
}
</script>
</head>
<body onload="onLoad();">
<div id="body">
<div id="tl" class="timeline-default" style="height: 600px;">
</div>
</body>
</html>