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.

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