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.

49 lines
1.7 KiB

10 years ago
10 years ago
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: 'group0', label: 'red'},
  19. {x: '2014-06-12', y: 25, className: 'group0', label: 'red'},
  20. {x: '2014-06-13', y: 30, className: 'group0', label: 'red'},
  21. {x: '2014-06-14', y: 10, className: 'group1', label: 'green'},
  22. {x: '2014-06-15', y: 15, className: 'group1', label: 'green'},
  23. {x: '2014-06-16', y: 30, className: 'group1', label: 'green'},
  24. {x: '2014-06-17', y: 10, className: 'group2', label: 'green'},
  25. {x: '2014-06-18', y: 15, className: 'group2', label: 'green'},
  26. {x: '2014-06-19', y: 50, className: 'group2', label: 'green'},
  27. {x: '2014-06-20', y: 10, className: 'group3', label: 'green'},
  28. {x: '2014-06-21', y: 19, className: 'group3', label: 'green'},
  29. {x: '2014-06-22', y: 60, className: 'group3', label: 'green'},
  30. {x: '2014-06-23', y: 10, className: 'group4', label: 'red'},
  31. {x: '2014-06-24', y: 25, className: 'group4', label: 'red'},
  32. {x: '2014-06-25', y: 30, className: 'group4', label: 'red'}
  33. // {x: '2014-06-11', y: 10},
  34. // {x: '2014-06-12', y: 25},
  35. // {x: '2014-06-13', y: 30},
  36. // {x: '2014-06-14', y: 10},
  37. // {x: '2014-06-15', y: 15},
  38. // {x: '2014-06-16', y: 30}
  39. ];
  40. var dataset = new vis.DataSet(items);
  41. var options = {};
  42. var graph2d = new vis.Graph2d(container, dataset, options);
  43. </script>
  44. </body>
  45. </html>