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.

33 lines
882 B

10 years ago
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. {x: '2014-06-11', y: 10, className: 'redd'},
  19. {x: '2014-06-12', y: 25, className: 'redd'},
  20. {x: '2014-06-13', y: 30, className: 'redd'},
  21. {x: '2014-06-14', y: 10, className: 'greenn'},
  22. {x: '2014-06-15', y: 15, className: 'greenn'},
  23. {x: '2014-06-16', y: 30, className: 'greenn'}
  24. ];
  25. var dataset = new vis.DataSet(items);
  26. var options = {};
  27. var graph2d = new vis.Graph2d(container, dataset, options);
  28. </script>
  29. </body>
  30. </html>