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.

72 lines
1.6 KiB

  1. <!doctype html>
  2. <html>
  3. <head>
  4. <title>Network | Playing with Physics</title>
  5. <style type="text/css">
  6. body {
  7. font: 10pt sans;
  8. }
  9. #mynetwork {
  10. float:left;
  11. width: 600px;
  12. height: 600px;
  13. margin:5px;
  14. border: 1px solid lightgray;
  15. }
  16. #config {
  17. float:left;
  18. width: 400px;
  19. height: 600px;
  20. }
  21. p {
  22. font-size:16px;
  23. max-width:700px;
  24. }
  25. </style>
  26. <script type="text/javascript" src="../../exampleUtil.js"></script>
  27. <script type="text/javascript" src="../../../../dist/vis.js"></script>
  28. <link href="../../../../dist/vis.css" rel="stylesheet" type="text/css" />
  29. <script type="text/javascript">
  30. var nodes = null;
  31. var edges = null;
  32. var network = null;
  33. function draw() {
  34. nodes = [];
  35. edges = [];
  36. // randomly create some nodes and edges
  37. var data = getScaleFreeNetwork(25);
  38. // create a network
  39. var container = document.getElementById('mynetwork');
  40. var options = {
  41. physics: {
  42. stabilization: false
  43. },
  44. configure: true
  45. };
  46. network = new vis.Network(container, data, options);
  47. }
  48. </script>
  49. <script src="../../../googleAnalytics.js"></script>
  50. </head>
  51. <body onload="draw();">
  52. <p>
  53. The configurator can be used to play with the options. In this example, all options that can be configured with this tool are shown.
  54. You can also supply a custom filter function or filter string. You can press the generate options button below to have an options object printed. You can then use
  55. this in the network.
  56. </p>
  57. <br />
  58. <div id="mynetwork"></div>
  59. <p id="selection"></p>
  60. </body>
  61. </html>