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.

329 lines
14 KiB

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>Timeline Examples</title>
  8. <link rel="icon" HREF="favicon.ico">
  9. <!-- Bootstrap -->
  10. <link href="./css/bootstrap.css" rel="stylesheet">
  11. <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
  12. <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  13. <!--[if lt IE 9]>
  14. <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  15. <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  16. <![endif]-->
  17. <link href="./css/prettify.css" rel="stylesheet" type="text/css" />
  18. <script type="text/javascript" src="./js/prettify/prettify.js"></script>
  19. <script src="./dist/vis.js"></script>
  20. <link href="./dist/vis.css" rel="stylesheet" type="text/css" />
  21. <link href="./css/examples.css" rel="stylesheet" type="text/css" />
  22. <style>
  23. img.example {
  24. height:150px;
  25. }
  26. </style>
  27. <script language="JavaScript">
  28. function loadVis() {
  29. // DOM element where the Timeline will be attached
  30. var container = document.getElementById('visualization');
  31. // Create a DataSet (allows two way data-binding)
  32. var items = new vis.DataSet([
  33. {id: 1, content: 'item 1', start: '2014-04-20'},
  34. {id: 2, content: 'item 2', start: '2014-04-14'},
  35. {id: 3, content: 'item 3', start: '2014-04-18'},
  36. {id: 4, content: 'item 4', start: '2014-04-16', end: '2014-04-19'},
  37. {id: 5, content: 'item 5', start: '2014-04-25'},
  38. {id: 6, content: 'item 6', start: '2014-04-27', type: 'point'}
  39. ]);
  40. // Configuration for the Timeline
  41. var options = {height:'552px', clickToUse:true};
  42. // Create a Timeline
  43. var timeline = new vis.Timeline(container, items, options);
  44. }
  45. </script>
  46. </head>
  47. <body onload="prettyPrint(); loadVis();">
  48. <div class="navbar-wrapper">
  49. <div class="container">
  50. <nav class="navbar navbar-inverse navbar-static-top" role="navigation">
  51. <div class="container">
  52. <div class="navbar-header">
  53. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
  54. <span class="sr-only">Toggle navigation</span>
  55. <span class="icon-bar"></span>
  56. <span class="icon-bar"></span>
  57. <span class="icon-bar"></span>
  58. </button>
  59. <a class="navbar-brand hidden-sm" href="./index.html">vis.js</a>
  60. </div>
  61. <div id="navbar" class="navbar-collapse collapse">
  62. <ul class="nav navbar-nav">
  63. <li class="active"><a href="./index.html#modules">Modules</a></li>
  64. <li><a href="./docs/index.html" target="_blank">Documentation <img class="icon" src="./images/external-link-icons/external-link-icon-white.png"></a></li>
  65. <li><a href="./blog.html">Blog</a></li>
  66. <li><a href="./index.html#download_install">Download</a></li>
  67. <li><a href="./index.html#showcase">Showcase</a></li>
  68. <li><a href="./index.html#contribute">Contribute</a></li>
  69. <li><a href="./index.html#featureRequests">Feature requests</a></li>
  70. <li><a href="./index.html#licenses">License</a></li>
  71. </ul>
  72. </div>
  73. </div>
  74. </nav>
  75. </div>
  76. </div>
  77. <div class="contentWrapper">
  78. <h1>Timeline Examples</h1>
  79. <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>
  80. <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>
  81. <pre class="prettyprint lang-html">
  82. &lt;div id="visualization"&gt;&lt;/div&gt;
  83. &lt;script type="text/javascript"&gt;
  84. // DOM element where the Timeline will be attached
  85. var container = document.getElementById('visualization');
  86. // Create a DataSet (allows two way data-binding)
  87. var items = new vis.DataSet([
  88. {id: 1, content: 'item 1', start: '2014-04-20'},
  89. {id: 2, content: 'item 2', start: '2014-04-14'},
  90. {id: 3, content: 'item 3', start: '2014-04-18'},
  91. {id: 4, content: 'item 4', start: '2014-04-16'}
  92. {id: 5, content: 'item 5', start: '2014-04-25'},
  93. {id: 6, content: 'item 6', start: '2014-04-27'}
  94. ]);
  95. // Configuration for the Timeline
  96. var options = {};
  97. // Create a Timeline
  98. var timeline = new vis.Timeline(
  99. container,
  100. items,
  101. options
  102. );
  103. &lt;/script&gt;</pre>
  104. <div id="visualization"></div>
  105. <h2 id="allExamples">All examples</h2>
  106. <div class="container-fluid">
  107. <div class="col-lg-2 col-md-3 col-sm-6">
  108. <a href="examples/timeline/01_basic.html">
  109. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/1.png">
  110. <div class="exampleTitle">basic usage</div>
  111. </a>
  112. </div>
  113. <div class="col-lg-2 col-md-3 col-sm-6">
  114. <a href="examples/timeline/02_interactive.html">
  115. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/2.png">
  116. <div class="exampleTitle">interactive</div>
  117. </a>
  118. </div>
  119. <div class="col-lg-2 col-md-3 col-sm-6">
  120. <a href="examples/timeline/03_performance.html">
  121. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/3.png">
  122. <div class="exampleTitle">performance</div>
  123. </a>
  124. </div>
  125. <div class="col-lg-2 col-md-3 col-sm-6">
  126. <a href="examples/timeline/04_html_data.html">
  127. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/4.png">
  128. <div class="exampleTitle">html data</div>
  129. </a>
  130. </div>
  131. <div class="col-lg-2 col-md-3 col-sm-6">
  132. <a href="examples/timeline/05_groups.html">
  133. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/5.png">
  134. <div class="exampleTitle">groups</div>
  135. </a>
  136. </div>
  137. <div class="col-lg-2 col-md-3 col-sm-6">
  138. <a href="examples/timeline/06_event_listeners.html">
  139. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/6.png">
  140. <div class="exampleTitle">event listeners</div>
  141. </a>
  142. </div>
  143. <div class="col-lg-2 col-md-3 col-sm-6">
  144. <a href="examples/timeline/07_custom_time_bar.html">
  145. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/7.png">
  146. <div class="exampleTitle">custom time bar</div>
  147. </a>
  148. </div>
  149. <div class="col-lg-2 col-md-3 col-sm-6">
  150. <a href="examples/timeline/08_edit_items.html">
  151. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/8.png">
  152. <div class="exampleTitle">edit items</div>
  153. </a>
  154. </div>
  155. <div class="col-lg-2 col-md-3 col-sm-6">
  156. <a href="examples/timeline/09_order_groups.html">
  157. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/9.png">
  158. <div class="exampleTitle">order groups</div>
  159. </a>
  160. </div>
  161. <div class="col-lg-2 col-md-3 col-sm-6">
  162. <a href="examples/timeline/10_limit_move_and_zoom.html">
  163. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/10.png">
  164. <div class="exampleTitle">limit move and zoom</div>
  165. </a>
  166. </div>
  167. <div class="col-lg-2 col-md-3 col-sm-6">
  168. <a href="examples/timeline/11_points.html">
  169. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/11.png">
  170. <div class="exampleTitle">points</div>
  171. </a>
  172. </div>
  173. <div class="col-lg-2 col-md-3 col-sm-6">
  174. <a href="examples/timeline/12_custom_styling.html">
  175. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/12.png">
  176. <div class="exampleTitle">custom styling</div>
  177. </a>
  178. </div>
  179. <div class="col-lg-2 col-md-3 col-sm-6">
  180. <a href="examples/timeline/13_past_and_future.html">
  181. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/13.png">
  182. <div class="exampleTitle">past and future</div>
  183. </a>
  184. </div>
  185. <div class="col-lg-2 col-md-3 col-sm-6">
  186. <a href="examples/timeline/14_group_performance.html">
  187. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/14.png">
  188. <div class="exampleTitle">group performance</div>
  189. </a>
  190. </div>
  191. <div class="col-lg-2 col-md-3 col-sm-6">
  192. <a href="examples/timeline/15_item_class_names.html">
  193. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/15.png">
  194. <div class="exampleTitle">item class names</div>
  195. </a>
  196. </div>
  197. <div class="col-lg-2 col-md-3 col-sm-6">
  198. <a href="examples/timeline/16_navigation_menu.html">
  199. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/16.png">
  200. <div class="exampleTitle">navigation menu</div>
  201. </a>
  202. </div>
  203. <div class="col-lg-2 col-md-3 col-sm-6">
  204. <a href="examples/timeline/17_data_serialization.html">
  205. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/17.png">
  206. <div class="exampleTitle">data serialization</div>
  207. </a>
  208. </div>
  209. <div class="col-lg-2 col-md-3 col-sm-6">
  210. <a href="examples/timeline/18_range_overflow.html">
  211. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/18.png">
  212. <div class="exampleTitle">range overflow</div>
  213. </a>
  214. </div>
  215. <div class="col-lg-2 col-md-3 col-sm-6">
  216. <a href="examples/timeline/19_localization.html">
  217. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/19.png">
  218. <div class="exampleTitle">localization</div>
  219. </a>
  220. </div>
  221. <div class="col-lg-2 col-md-3 col-sm-6">
  222. <a href="examples/timeline/20_click_to_use.html">
  223. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/20.png">
  224. <div class="exampleTitle">click to use</div>
  225. </a>
  226. </div>
  227. <div class="col-lg-2 col-md-3 col-sm-6">
  228. <a href="examples/timeline/21_set_selection.html">
  229. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/21.png">
  230. <div class="exampleTitle">set selection</div>
  231. </a>
  232. </div>
  233. <div class="col-lg-2 col-md-3 col-sm-6">
  234. <a href="examples/timeline/22_window_adjustment.html">
  235. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/22.png">
  236. <div class="exampleTitle">window adjustment</div>
  237. </a>
  238. </div>
  239. <div class="col-lg-2 col-md-3 col-sm-6">
  240. <a href="examples/timeline/23_data_attributes.html">
  241. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/23.png">
  242. <div class="exampleTitle">data attributes</div>
  243. </a>
  244. </div>
  245. <div class="col-lg-2 col-md-3 col-sm-6">
  246. <a href="examples/timeline/24_all_data_attributes.html">
  247. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/24.png">
  248. <div class="exampleTitle">all data attributes</div>
  249. </a>
  250. </div>
  251. <div class="col-lg-2 col-md-3 col-sm-6">
  252. <a href="examples/timeline/25_background_areas.html">
  253. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/25.png">
  254. <div class="exampleTitle">background areas</div>
  255. </a>
  256. </div>
  257. <div class="col-lg-2 col-md-3 col-sm-6">
  258. <a href="examples/timeline/26_external_data.html">
  259. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/26.png">
  260. <div class="exampleTitle">external data</div>
  261. </a>
  262. </div>
  263. <div class="col-lg-2 col-md-3 col-sm-6">
  264. <a href="examples/timeline/27_templates.html">
  265. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/27.png">
  266. <div class="exampleTitle">templates</div>
  267. </a>
  268. </div>
  269. <!--there is no example 28?-->
  270. <div class="col-lg-2 col-md-3 col-sm-6">
  271. <a href="examples/timeline/29_hiding_times.html">
  272. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/28.png">
  273. <div class="exampleTitle">hiding times</div>
  274. </a>
  275. </div>
  276. <div class="col-lg-2 col-md-3 col-sm-6">
  277. <a href="examples/timeline/30_subgroups.html">
  278. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/29.png">
  279. <div class="exampleTitle">subgroups</div>
  280. </a>
  281. </div>
  282. <div class="col-lg-2 col-md-3 col-sm-6">
  283. <a href="examples/timeline/31_background_areas_with_groups.html">
  284. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/30.png">
  285. <div class="exampleTitle">background areas with groups</div>
  286. </a>
  287. </div>
  288. <div class="col-lg-2 col-md-3 col-sm-6">
  289. <a href="examples/timeline/32_grid_styling.html">
  290. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/31.png">
  291. <div class="exampleTitle">grid styling</div>
  292. </a>
  293. </div>
  294. <div class="col-lg-2 col-md-3 col-sm-6">
  295. <a href="examples/timeline/requirejs/requirejs_example.html">
  296. <img class="example img-responsive" src="./images/exampleScreenshots/timeline/requirejs.png">
  297. <div class="exampleTitle">grid styling</div>
  298. </a>
  299. </div>
  300. </div>
  301. <br />
  302. <br />
  303. <br />
  304. <br />
  305. </div>
  306. <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
  307. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
  308. <!-- Include all compiled plugins (below), or include individual files as needed -->
  309. <script src="js/bootstrap.min.js"></script>
  310. </body>
  311. </html>