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.

31 lines
875 B

10 years ago
10 years ago
10 years ago
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <title>Graph2d | 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', x: '2014-06-01', y: 10},
  19. {id: 2, content: 'item 2', x: '2014-06-02', y: 20},
  20. {id: 3, content: 'item 3', x: '2014-06-03', y: 30},
  21. {id: 4, content: 'item 4', x: '2014-06-04', y: 10},
  22. {id: 5, content: 'item 5', x: '2014-06-05', y: 20},
  23. {id: 6, content: 'item 6', x: '2014-06-06', y: 30}
  24. ];
  25. var options = {};
  26. var graph2d = new vis.Graph2d(container, items, options);
  27. </script>
  28. </body>
  29. </html>