Collaborama About Help Contact Anonymous [login] Source: site.view [edit] Function name: displayTimeLine1 Arguments: Description: Page type: html Render function: Module: sandbox Page source: <html> <head> <script src="http://simile.mit.edu/timeline/api/timeline-api.js" 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, Timeline.HORIZONTAL); Timeline.loadJSON("http://simile.mit.edu/timeline/examples/cubism/cubism.js", 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();"> <div id="body"> <h1>Timeline</h1> <div id="tl" class="timeline-default" style="height: 400px; margin: 2em;"> </div> </body> </html>