vis.js is a dynamic, browser-based visualization library
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.
 
 
 

317 lines
12 KiB

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Timeline Examples</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<link href="./css/prettify.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="./js/prettify/prettify.js"></script>
<script src="./dist/vis.js"></script>
<link href="./dist/vis.css" rel="stylesheet" type="text/css" />
<style>
body {
padding:10px;
}
pre {
width:450px;
height:552px;
overflow:auto;
}
#visualization {
margin-left:470px;
margin-top:-562px;
width:500px;
height:552px;
}
div.textHTMLContent {
margin-top:10px;
margin-bottom:10px;
display:block;
width:800px;
}
img {
border:1px solid #032740;
width:250px;
height:150px;
margin-top:10px;
}
div.exampleTitle {
width:250px;
height:30px;
background-color:#032740;
color:#ffffff;
text-align:center;
vertical-align:middle;
line-height: 30px;
}
</style>
<script language="JavaScript">
function loadVis() {
// DOM element where the Timeline will be attached
var container = document.getElementById('visualization');
// Create a DataSet (allows two way data-binding)
var items = new vis.DataSet([
{id: 1, content: 'item 1', start: '2014-04-20'},
{id: 2, content: 'item 2', start: '2014-04-14'},
{id: 3, content: 'item 3', start: '2014-04-18'},
{id: 4, content: 'item 4', start: '2014-04-16', end: '2014-04-19'},
{id: 5, content: 'item 5', start: '2014-04-25'},
{id: 6, content: 'item 6', start: '2014-04-27', type: 'point'}
]);
// Configuration for the Timeline
var options = {height:'552px', clickToUse:true};
// Create a Timeline
var timeline = new vis.Timeline(container, items, options);
}
</script>
</head>
<body onload="prettyPrint(); loadVis();">
<h1>Timeline Examples</h1>
<a class="btn btn-default" href="#allExamples" role="button">View all examples »</a> <a class="btn btn-primary" href="./docs/timeline.html" role="button">View docs »</a>
<div class="textHTMLContent">This small code example shows the easiest way to get a timline up and running. This code has been taken from example 1. The working example is shown next to it. Click it to start the interaction.</div>
<pre class="prettyprint lang-html">
&lt;div id="visualization"&gt;&lt;/div&gt;
&lt;script type="text/javascript"&gt;
// DOM element where the Timeline will be attached
var container = document.getElementById('visualization');
// Create a DataSet (allows two way data-binding)
var items = new vis.DataSet([
{id: 1, content: 'item 1', start: '2014-04-20'},
{id: 2, content: 'item 2', start: '2014-04-14'},
{id: 3, content: 'item 3', start: '2014-04-18'},
{id: 4, content: 'item 4', start: '2014-04-16'}
{id: 5, content: 'item 5', start: '2014-04-25'},
{id: 6, content: 'item 6', start: '2014-04-27'}
]);
// Configuration for the Timeline
var options = {};
// Create a Timeline
var timeline = new vis.Timeline(
container,
items,
options
);
&lt;/script&gt;</pre>
<div id="visualization"></div>
<h2 id="allExamples">All examples</h2>
<div class="container-fluid">
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/01_basic.html">
<img src="./images/gallery/timeline/1.png">
<div class="exampleTitle">basic usage</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/02_interactive.html">
<img src="./images/gallery/timeline/2.png">
<div class="exampleTitle">interactive</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/03_performance.html">
<img src="./images/gallery/timeline/3.png">
<div class="exampleTitle">performance</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/04_html_data.html">
<img src="./images/gallery/timeline/4.png">
<div class="exampleTitle">html data</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/05_groups.html">
<img src="./images/gallery/timeline/5.png">
<div class="exampleTitle">groups</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/06_event_listeners.html">
<img src="./images/gallery/timeline/6.png">
<div class="exampleTitle">event listeners</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/07_custom_time_bar.html">
<img src="./images/gallery/timeline/7.png">
<div class="exampleTitle">custom time bar</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/08_edit_items.html">
<img src="./images/gallery/timeline/8.png">
<div class="exampleTitle">edit items</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/09_order_groups.html">
<img src="./images/gallery/timeline/9.png">
<div class="exampleTitle">order groups</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/10_limit_move_and_zoom.html">
<img src="./images/gallery/timeline/10.png">
<div class="exampleTitle">limit move and zoom</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/11_points.html">
<img src="./images/gallery/timeline/11.png">
<div class="exampleTitle">points</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/12_custom_styling.html">
<img src="./images/gallery/timeline/12.png">
<div class="exampleTitle">custom styling</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/13_past_and_future.html">
<img src="./images/gallery/timeline/13.png">
<div class="exampleTitle">past and future</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/14_group_performance.html">
<img src="./images/gallery/timeline/14.png">
<div class="exampleTitle">group performance</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/15_item_class_names.html">
<img src="./images/gallery/timeline/15.png">
<div class="exampleTitle">item class names</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/16_navigation_menu.html">
<img src="./images/gallery/timeline/16.png">
<div class="exampleTitle">navigation menu</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/17_data_serialization.html">
<img src="./images/gallery/timeline/17.png">
<div class="exampleTitle">data serialization</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/18_range_overflow.html">
<img src="./images/gallery/timeline/18.png">
<div class="exampleTitle">range overflow</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/19_localization.html">
<img src="./images/gallery/timeline/19.png">
<div class="exampleTitle">localization</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/20_click_to_use.html">
<img src="./images/gallery/timeline/20.png">
<div class="exampleTitle">click to use</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/21_set_selection.html">
<img src="./images/gallery/timeline/21.png">
<div class="exampleTitle">set selection</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/22_window_adjustment.html">
<img src="./images/gallery/timeline/22.png">
<div class="exampleTitle">window adjustment</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/23_data_attributes.html">
<img src="./images/gallery/timeline/23.png">
<div class="exampleTitle">data attributes</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/24_all_data_attributes.html">
<img src="./images/gallery/timeline/24.png">
<div class="exampleTitle">all data attributes</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/25_background_areas.html">
<img src="./images/gallery/timeline/25.png">
<div class="exampleTitle">background areas</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/26_external_data.html">
<img src="./images/gallery/timeline/26.png">
<div class="exampleTitle">external data</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/27_templates.html">
<img src="./images/gallery/timeline/27.png">
<div class="exampleTitle">templates</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/29_hiding_times.html">
<img src="./images/gallery/timeline/28.png">
<div class="exampleTitle">hiding times</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/30_subgroups.html">
<img src="./images/gallery/timeline/29.png">
<div class="exampleTitle">subgroups</div>
</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-6">
<a href="examples/timeline/31_background_areas_with_groups.html">
<img src="./images/gallery/timeline/30.png">
<div class="exampleTitle">background areas with groups</div>
</a>
</div>
</div>
<br />
<br />
<br />
<br />
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>