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.

316 lines
12 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 #032740;
  43. width:250px;
  44. height:150px;
  45. margin-top:10px;
  46. }
  47. div.exampleTitle {
  48. width:250px;
  49. height:30px;
  50. background-color:#032740;
  51. color:#ffffff;
  52. text-align:center;
  53. vertical-align:middle;
  54. line-height: 30px;
  55. }
  56. </style>
  57. <script language="JavaScript">
  58. function loadVis() {
  59. // DOM element where the Timeline will be attached
  60. var container = document.getElementById('visualization');
  61. // Create a DataSet (allows two way data-binding)
  62. var items = new vis.DataSet([
  63. {id: 1, content: 'item 1', start: '2014-04-20'},
  64. {id: 2, content: 'item 2', start: '2014-04-14'},
  65. {id: 3, content: 'item 3', start: '2014-04-18'},
  66. {id: 4, content: 'item 4', start: '2014-04-16', end: '2014-04-19'},
  67. {id: 5, content: 'item 5', start: '2014-04-25'},
  68. {id: 6, content: 'item 6', start: '2014-04-27', type: 'point'}
  69. ]);
  70. // Configuration for the Timeline
  71. var options = {height:'552px', clickToUse:true};
  72. // Create a Timeline
  73. var timeline = new vis.Timeline(container, items, options);
  74. }
  75. </script>
  76. </head>
  77. <body onload="prettyPrint(); loadVis();">
  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-3 col-md-3 col-sm-6">
  108. <a href="examples/timeline/01_basic.html">
  109. <img src="./images/gallery/timeline/1.png">
  110. <div class="exampleTitle">basic usage</div>
  111. </a>
  112. </div>
  113. <div class="col-lg-3 col-md-3 col-sm-6">
  114. <a href="examples/timeline/02_interactive.html">
  115. <img src="./images/gallery/timeline/2.png">
  116. <div class="exampleTitle">interactive</div>
  117. </a>
  118. </div>
  119. <div class="col-lg-3 col-md-3 col-sm-6">
  120. <a href="examples/timeline/03_performance.html">
  121. <img src="./images/gallery/timeline/3.png">
  122. <div class="exampleTitle">performance</div>
  123. </a>
  124. </div>
  125. <div class="col-lg-3 col-md-3 col-sm-6">
  126. <a href="examples/timeline/04_html_data.html">
  127. <img src="./images/gallery/timeline/4.png">
  128. <div class="exampleTitle">html data</div>
  129. </a>
  130. </div>
  131. <div class="col-lg-3 col-md-3 col-sm-6">
  132. <a href="examples/timeline/05_groups.html">
  133. <img src="./images/gallery/timeline/5.png">
  134. <div class="exampleTitle">groups</div>
  135. </a>
  136. </div>
  137. <div class="col-lg-3 col-md-3 col-sm-6">
  138. <a href="examples/timeline/06_event_listeners.html">
  139. <img src="./images/gallery/timeline/6.png">
  140. <div class="exampleTitle">event listeners</div>
  141. </a>
  142. </div>
  143. <div class="col-lg-3 col-md-3 col-sm-6">
  144. <a href="examples/timeline/07_custom_time_bar.html">
  145. <img src="./images/gallery/timeline/7.png">
  146. <div class="exampleTitle">custom time bar</div>
  147. </a>
  148. </div>
  149. <div class="col-lg-3 col-md-3 col-sm-6">
  150. <a href="examples/timeline/08_edit_items.html">
  151. <img src="./images/gallery/timeline/8.png">
  152. <div class="exampleTitle">edit items</div>
  153. </a>
  154. </div>
  155. <div class="col-lg-3 col-md-3 col-sm-6">
  156. <a href="examples/timeline/09_order_groups.html">
  157. <img src="./images/gallery/timeline/9.png">
  158. <div class="exampleTitle">order groups</div>
  159. </a>
  160. </div>
  161. <div class="col-lg-3 col-md-3 col-sm-6">
  162. <a href="examples/timeline/10_limit_move_and_zoom.html">
  163. <img src="./images/gallery/timeline/10.png">
  164. <div class="exampleTitle">limit move and zoom</div>
  165. </a>
  166. </div>
  167. <div class="col-lg-3 col-md-3 col-sm-6">
  168. <a href="examples/timeline/11_points.html">
  169. <img src="./images/gallery/timeline/11.png">
  170. <div class="exampleTitle">points</div>
  171. </a>
  172. </div>
  173. <div class="col-lg-3 col-md-3 col-sm-6">
  174. <a href="examples/timeline/12_custom_styling.html">
  175. <img src="./images/gallery/timeline/12.png">
  176. <div class="exampleTitle">custom styling</div>
  177. </a>
  178. </div>
  179. <div class="col-lg-3 col-md-3 col-sm-6">
  180. <a href="examples/timeline/13_past_and_future.html">
  181. <img src="./images/gallery/timeline/13.png">
  182. <div class="exampleTitle">past and future</div>
  183. </a>
  184. </div>
  185. <div class="col-lg-3 col-md-3 col-sm-6">
  186. <a href="examples/timeline/14_group_performance.html">
  187. <img src="./images/gallery/timeline/14.png">
  188. <div class="exampleTitle">group performance</div>
  189. </a>
  190. </div>
  191. <div class="col-lg-3 col-md-3 col-sm-6">
  192. <a href="examples/timeline/15_item_class_names.html">
  193. <img src="./images/gallery/timeline/15.png">
  194. <div class="exampleTitle">item class names</div>
  195. </a>
  196. </div>
  197. <div class="col-lg-3 col-md-3 col-sm-6">
  198. <a href="examples/timeline/16_navigation_menu.html">
  199. <img src="./images/gallery/timeline/16.png">
  200. <div class="exampleTitle">navigation menu</div>
  201. </a>
  202. </div>
  203. <div class="col-lg-3 col-md-3 col-sm-6">
  204. <a href="examples/timeline/17_data_serialization.html">
  205. <img src="./images/gallery/timeline/17.png">
  206. <div class="exampleTitle">data serialization</div>
  207. </a>
  208. </div>
  209. <div class="col-lg-3 col-md-3 col-sm-6">
  210. <a href="examples/timeline/18_range_overflow.html">
  211. <img src="./images/gallery/timeline/18.png">
  212. <div class="exampleTitle">range overflow</div>
  213. </a>
  214. </div>
  215. <div class="col-lg-3 col-md-3 col-sm-6">
  216. <a href="examples/timeline/19_localization.html">
  217. <img src="./images/gallery/timeline/19.png">
  218. <div class="exampleTitle">localization</div>
  219. </a>
  220. </div>
  221. <div class="col-lg-3 col-md-3 col-sm-6">
  222. <a href="examples/timeline/20_click_to_use.html">
  223. <img src="./images/gallery/timeline/20.png">
  224. <div class="exampleTitle">click to use</div>
  225. </a>
  226. </div>
  227. <div class="col-lg-3 col-md-3 col-sm-6">
  228. <a href="examples/timeline/21_set_selection.html">
  229. <img src="./images/gallery/timeline/21.png">
  230. <div class="exampleTitle">set selection</div>
  231. </a>
  232. </div>
  233. <div class="col-lg-3 col-md-3 col-sm-6">
  234. <a href="examples/timeline/22_window_adjustment.html">
  235. <img src="./images/gallery/timeline/22.png">
  236. <div class="exampleTitle">window adjustment</div>
  237. </a>
  238. </div>
  239. <div class="col-lg-3 col-md-3 col-sm-6">
  240. <a href="examples/timeline/23_data_attributes.html">
  241. <img src="./images/gallery/timeline/23.png">
  242. <div class="exampleTitle">data attributes</div>
  243. </a>
  244. </div>
  245. <div class="col-lg-3 col-md-3 col-sm-6">
  246. <a href="examples/timeline/24_all_data_attributes.html">
  247. <img src="./images/gallery/timeline/24.png">
  248. <div class="exampleTitle">all data attributes</div>
  249. </a>
  250. </div>
  251. <div class="col-lg-3 col-md-3 col-sm-6">
  252. <a href="examples/timeline/25_background_areas.html">
  253. <img src="./images/gallery/timeline/25.png">
  254. <div class="exampleTitle">background areas</div>
  255. </a>
  256. </div>
  257. <div class="col-lg-3 col-md-3 col-sm-6">
  258. <a href="examples/timeline/26_external_data.html">
  259. <img src="./images/gallery/timeline/26.png">
  260. <div class="exampleTitle">external data</div>
  261. </a>
  262. </div>
  263. <div class="col-lg-3 col-md-3 col-sm-6">
  264. <a href="examples/timeline/27_templates.html">
  265. <img src="./images/gallery/timeline/27.png">
  266. <div class="exampleTitle">templates</div>
  267. </a>
  268. </div>
  269. <div class="col-lg-3 col-md-3 col-sm-6">
  270. <a href="examples/timeline/29_hiding_times.html">
  271. <img src="./images/gallery/timeline/28.png">
  272. <div class="exampleTitle">hiding times</div>
  273. </a>
  274. </div>
  275. <div class="col-lg-3 col-md-3 col-sm-6">
  276. <a href="examples/timeline/30_subgroups.html">
  277. <img src="./images/gallery/timeline/29.png">
  278. <div class="exampleTitle">subgroups</div>
  279. </a>
  280. </div>
  281. <div class="col-lg-3 col-md-3 col-sm-6">
  282. <a href="examples/timeline/31_background_areas_with_groups.html">
  283. <img src="./images/gallery/timeline/30.png">
  284. <div class="exampleTitle">background areas with groups</div>
  285. </a>
  286. </div>
  287. </div>
  288. <br />
  289. <br />
  290. <br />
  291. <br />
  292. <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
  293. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
  294. <!-- Include all compiled plugins (below), or include individual files as needed -->
  295. <script src="js/bootstrap.min.js"></script>
  296. </body>
  297. </html>