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.

325 lines
13 KiB

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