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.

46 lines
1.6 KiB

  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <title>Timeline | Basic demo</title>
  5. <style type="text/css">
  6. body, html {
  7. font-family: sans-serif;
  8. }
  9. </style>
  10. <script src="../../dist/vis.js"></script>
  11. <link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
  12. </head>
  13. <body>
  14. <div id="visualization"></div>
  15. <script type="text/javascript">
  16. var container = document.getElementById('visualization');
  17. var items = [
  18. {id: 1, content: 'item 1', start: '2014-04-20'},
  19. {id: 2, content: 'item 2', start: '2014-04-14'},
  20. {id: 3, content: 'item 3', start: '2014-04-18'},
  21. {id: 5, content: 'item 5', start: '2014-04-25'},
  22. {id: 6, content: 'item 6', start: '2014-04-27'},
  23. {id: 7, content: 'item 3', start: '2014-06-18'},
  24. {id: 8, content: 'item 5', start: '2014-06-25'},
  25. {id: 9, content: 'item 6', start: '2014-06-27'},
  26. {id: 10, content: 'item 3', start: '2014-06-18'},
  27. {id: 11, content: 'item 5', start: '2014-06-25'},
  28. {id: 12, content: 'item 6', start: '2014-01-27'},
  29. {id: 13, content: 'item 3', start: '2014-01-18'},
  30. {id: 14, content: 'item 5', start: '2014-01-25'},
  31. {id: 15, content: 'item 6', start: '2014-02-27'},
  32. {id: 16, content: 'item 3', start: '2014-02-18'},
  33. {id: 17, content: 'item 5', start: '2014-02-25'},
  34. {id: 18, content: 'item 6', start: '2014-09-27'},
  35. {id: 24, content: 'item 4', start: '2014-05-16', end: '2015-06-19'}
  36. ];
  37. var options = {
  38. start: '2014-02-10',
  39. end: '2014-05-10'
  40. };
  41. var timeline = new vis.Timeline(container, items, options);
  42. </script>
  43. </body>
  44. </html>