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.

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