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.

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