-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html~
61 lines (55 loc) · 1.79 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
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>Ejemplo Timeline - Scrapathon</title>
<script>
Timeline_ajax_url="/js/timeline/timeline_ajax/simile-ajax-api.js";
Timeline_urlPrefix='/js/timeline/timeline_js/';
Timeline_parameters='bundle=true';
</script>
<script src="/js/timeline/timeline_js/timeline-api.js"
type="text/javascript">
</script>
<link type="text/css" href="styles.css" rel="stylesheet"></link>
<script src="out.json" type="text/javascript"></script>
<script>
var tl;
function onLoad() {
var eventSource = new Timeline.DefaultEventSource(0);
var theme = Timeline.ClassicTheme.create();
theme.event.bubble.width = 320;
theme.event.bubble.height = 220;
var d = Timeline.DateTime.parseGregorianDateTime("1900")
var bandInfos = [
Timeline.createBandInfo({
width: "100%",
intervalUnit: Timeline.DateTime.DECADE,
intervalPixels: 200,
eventSource: eventSource,
//date: d,
theme: theme,
})
];
// tl = Timeline.create(document.getElementById("tl"), bandInfos);
tl = Timeline.create(document.getElementById("tl"), bandInfos, Timeline.HORIZONTAL);
tl.loadJSON("out.json", function(json, url) {
eventSource.loadJSON(json, url);
});
}
var resizeTimerID = null;
function onResize() {
if (resizeTimerID == null) {
resizeTimerID = window.setTimeout(function() {
resizeTimerID = null;
tl.layout();
}, 500);
}
}
</script>
</head>
<body onload="onLoad();" onresize="onResize();" cz-shortcut-listen="true">
<h1>Presidentes Chile</h1>
<div id="tl" style="height: 300px;">
</div>
</body>
</html>