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.

132 lines
3.5 KiB

  1. <!doctype html>
  2. <html>
  3. <head>
  4. <title>Network | Basic usage</title>
  5. <meta http-equiv="content-type" content="text/html; charset=UTF8">
  6. <script type="text/javascript" src="./js/FileSaver.min.js"></script>
  7. <script type="text/javascript" src="./js/vis.js"></script>
  8. <link href="./css/vis.css" rel="stylesheet" type="text/css" />
  9. <script type="text/javascript" src="./data/FP7_ICT.js"></script>
  10. <style type="text/css">
  11. #mynetwork {
  12. width: 100%;
  13. height: 90%;
  14. background-color:#222222;
  15. border:1px solid #333333;
  16. }
  17. body{
  18. background-color:#222222;
  19. width: 100%;
  20. height: 100%;
  21. }
  22. html {
  23. width: 100%;
  24. height: 100%;
  25. }
  26. #controls {
  27. /*background-color: #3ea349;*/
  28. }
  29. #FILENAME {
  30. color: #ffffff;
  31. }
  32. div.container {
  33. display:inline-flex;
  34. }
  35. div.year {
  36. float:left;
  37. width:150px;
  38. height:25px;
  39. background-color: #80baff;
  40. border: 2px solid #1e357e;
  41. font-size:20px;
  42. line-height:25px;
  43. text-align: center;
  44. margin-right:10px;
  45. margin-top:5px;
  46. margin-bottom:5px;
  47. }
  48. div.year.selected {
  49. background-color: #91ff88;
  50. border: 2px solid #297d21;
  51. font-size:22px;
  52. font-weight:bold;
  53. }
  54. select.selectBox {
  55. width:400px;
  56. }
  57. div.type {
  58. float:left;
  59. width:200px;
  60. height:25px;
  61. background-color: #80baff;
  62. border: 2px solid #1e357e;
  63. font-size:20px;
  64. line-height:25px;
  65. text-align: center;
  66. margin-right:10px;
  67. margin-bottom:5px;
  68. }
  69. div.type.selected {
  70. background-color: #91ff88;
  71. border: 2px solid #297d21;
  72. }
  73. div.label{
  74. display:inline-block;
  75. width:200px;
  76. font-size:15px;
  77. color:#ffffff;
  78. }
  79. div.debug {
  80. display:none;
  81. }
  82. </style>
  83. </head>
  84. <body>
  85. <div class="debug">
  86. <input type="button" value="100 steps" onclick="doSteps(100);">
  87. <input type="button" value="500 steps" onclick="doSteps(500);">
  88. <input type="button" value="1000 steps" onclick="doSteps(1000);">
  89. <input type="button" value="5000 steps" onclick="doSteps(5000);">
  90. <input type="button" value="unfreeze" onclick="network.setFreezeSimulation(false);">
  91. <input type="button" value="download" onclick="download();">
  92. <input type="button" value="next" onclick="next();">
  93. <span id="FILENAME">filename here</span>
  94. </div>
  95. <div id="controls">
  96. <div id="yearContainer" class="container"></div> <br />
  97. <div id="typeContainer" class="container">
  98. <div class="type" onclick="selectType('funding');">
  99. size by funding
  100. </div>
  101. <div class="type selected" onclick="selectType('connections');">
  102. size by connectivity
  103. </div>
  104. </div>
  105. <div id="projectContainer">
  106. <div class="label">Select a project to view: </div><select id="projectsDropdown" class="selectBox" onchange="selectProject(this)"></select>
  107. </div>
  108. <div id="companyContainer">
  109. <div class="label">Select a company to highlight:</div><select id="companyDropdown" class="selectBox" onchange="selectCompany(this)"></select>
  110. </div>
  111. <input type="button" value="Center galaxy" onclick="highlightConnections({nodes:[]}); network.zoomExtent({duration:0});">
  112. <input type="button" value="View all neighbours" onclick="viewAllNeighbours();">
  113. </div>
  114. <div id="mynetwork"></div>
  115. <script type="text/javascript" src="js/init_view.js"></script>
  116. </body>
  117. </html>