You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
2.8 KiB
73 lines
2.8 KiB
<html>
|
|
<head>
|
|
<title>Timeline demo</title>
|
|
|
|
<style type="text/css">
|
|
body {font: 10pt arial;}
|
|
</style>
|
|
|
|
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
|
|
<script type="text/javascript" src="../timeline.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="../timeline.css">
|
|
|
|
<script type="text/javascript">
|
|
var timeline;
|
|
|
|
google.load("visualization", "1");
|
|
|
|
// Set callback to run when API is loaded
|
|
google.setOnLoadCallback(drawVisualization);
|
|
|
|
// Called when the Visualization API is loaded.
|
|
function drawVisualization() {
|
|
// Create and populate a data table.
|
|
var data = new google.visualization.DataTable();
|
|
data.addColumn('datetime', 'start');
|
|
data.addColumn('datetime', 'end');
|
|
data.addColumn('string', 'content');
|
|
data.addColumn('string', 'type');
|
|
|
|
data.addRows([
|
|
[new Date(2010,7,23), , 'Conversation<br>' +
|
|
'<img src="img/comments-icon.png" style="width:32px; height:32px;">', 'box'],
|
|
[new Date(2010,7,23,23,0,0), , 'Mail from boss<br>' +
|
|
'<img src="img/mail-icon.png" style="width:32px; height:32px;">', 'box'],
|
|
[new Date(2010,7,26), new Date(2010,8,2), 'Traject A (default range)', 'range'],
|
|
[ , new Date(2010,7,26), 'Traject B ( floatingRange no start date )', 'floatingRange'],
|
|
[new Date(2010,7,31), , 'Traject C ( floatingRange no end date )', 'floatingRange'],
|
|
[ , , 'Traject D ( floatingRange no start date and no end date )', 'floatingRange']
|
|
]);
|
|
|
|
// specify options
|
|
var options = {
|
|
"width": "100%",
|
|
"height": "300px",
|
|
'editable': true, // enable dragging and editing events
|
|
};
|
|
|
|
// Instantiate our timeline object.
|
|
timeline = new links.Timeline(document.getElementById('mytimeline'), options);
|
|
|
|
// Draw our timeline with the created data and options
|
|
timeline.draw(data);
|
|
}
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
<h1>Timeline floatingRange demo</h1>
|
|
<p>
|
|
This demo shows how to use floatingRange items.
|
|
The start and end dates are optional in this type of range.
|
|
</p>
|
|
|
|
<div id="mytimeline"></div>
|
|
|
|
<!-- Information about where the used icons come from -->
|
|
<p style="color:gray; font-size:10px; font-style:italic;">
|
|
Icons by <a href="http://dryicons.com" target="_blank" title="Aesthetica 2 Icons by DryIcons" style="color:gray;" >DryIcons</a>
|
|
and <a href="http://www.tpdkdesign.net" target="_blank" title="Refresh Cl Icons by TpdkDesign.net" style="color:gray;" >TpdkDesign.net</a>
|
|
</p>
|
|
|
|
</body>
|
|
</html>
|