Browse Source

Update examples to include all_data_attributes

v3_develop
Dan Turkenkopf 10 years ago
parent
commit
99ad76972d
4 changed files with 47 additions and 3 deletions
  1. +43
    -0
      examples/timeline/24_all_data_attributes.html
  2. +0
    -0
      examples/timeline/25_background_areas.html
  3. +0
    -0
      examples/timeline/27_templates.html
  4. +4
    -3
      examples/timeline/index.html

+ 43
- 0
examples/timeline/24_all_data_attributes.html View File

@ -0,0 +1,43 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Timeline | Basic demo</title>
<style type="text/css">
body, html {
font-family: sans-serif;
}
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
</head>
<body>
<p>
In this example all items get HTML attributes attached: each item gets <code>data-?</code> attributes for each field defined on the JS object.
</p>
<div id="visualization"></div>
<script type="text/javascript">
// 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', tooltip: 'This is item 1'},
{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', tooltip: 'This is item 6'}
]);
// Configuration for the Timeline
var options = {dataAttributes: 'all'};
// Create a Timeline
var timeline = new vis.Timeline(container, items, options);
</script>
</body>
</html>

examples/timeline/24_background_areas.html → examples/timeline/25_background_areas.html View File


examples/timeline/25_templates.html → examples/timeline/27_templates.html View File


+ 4
- 3
examples/timeline/index.html View File

@ -35,9 +35,10 @@
<p><a href="21_set_selection.html">21_set_selection.html</a></p> <p><a href="21_set_selection.html">21_set_selection.html</a></p>
<p><a href="22_window_adjustment.html">22_window_adjustment.html</a></p> <p><a href="22_window_adjustment.html">22_window_adjustment.html</a></p>
<p><a href="23_data_attributes.html">23_data_attributes.html</a></p> <p><a href="23_data_attributes.html">23_data_attributes.html</a></p>
<p><a href="24_background_areas.html">24_background_areas.html</a></p>
<p><a href="25_templates.html">25_templates.html</a></p>
<p><a href="26_external_data.html">26_external_data.html</a></p>
<p><a href="24_all_data_attributes.html">24_all_data_attributes.html</a></p>
<p><a href="25_background_areas.html">25_background_areas.html</a></p>
<p><a href="26_templates.html">26_templates.html</a></p>
<p><a href="27_external_data.html">27_external_data.html</a></p>
<p><a href="requirejs/requirejs_example.html">requirejs_example.html</a></p> <p><a href="requirejs/requirejs_example.html">requirejs_example.html</a></p>

Loading…
Cancel
Save