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.

322 lines
13 KiB

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