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.

42 lines
1.0 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. div.SVGforeground {
  10. width:300px;
  11. height:300px;
  12. }
  13. svg.svgclass {
  14. width:300px;
  15. height:300px;
  16. }
  17. </style>
  18. <script src="../../dist/vis.js"></script>
  19. <link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
  20. </head>
  21. <body>
  22. <div id="visualization"></div>
  23. <script type="text/javascript">
  24. var container = document.getElementById('visualization');
  25. var items = [
  26. {id: 1, content: 'item 1', start: '2014-05-20'},
  27. {id: 2, content: 'item 2', start: '2014-05-14'},
  28. {id: 3, content: 'item 3', start: '2014-05-18'},
  29. {id: 4, content: 'item 4', start: '2014-05-16', end: '2014-05-19'},
  30. {id: 5, content: 'item 5', start: '2014-05-25'},
  31. {id: 6, content: 'item 6', start: '2014-05-27', type: 'point'}
  32. ];
  33. var options = {};
  34. var timeline = new vis.Timeline(container, items, options);
  35. </script>
  36. </body>
  37. </html>