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.

348 lines
12 KiB

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>Network Examples</title>
  8. <!-- Bootstrap -->
  9. <link href="css/bootstrap.min.css" rel="stylesheet">
  10. <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
  11. <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  12. <!--[if lt IE 9]>
  13. <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  14. <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  15. <![endif]-->
  16. <link href="./css/prettify.css" rel="stylesheet" type="text/css" />
  17. <script type="text/javascript" src="./js/prettify/prettify.js"></script>
  18. <script type="text/javascript" src="./js/vis.js"></script>
  19. <style>
  20. body {
  21. padding:10px;
  22. }
  23. pre {
  24. width:450px;
  25. height:552px;
  26. overflow:auto;
  27. }
  28. #visualization {
  29. display:block;
  30. margin-left:470px;
  31. margin-top:-562px;
  32. width:500px;
  33. height:552px;
  34. border: 1px solid #dddddd;
  35. border-radius:4px;
  36. background-color:#fcfcfc;
  37. }
  38. div.textHTMLContent {
  39. margin-top:10px;
  40. margin-bottom:10px;
  41. display:block;
  42. width:800px;
  43. }
  44. img {
  45. border:1px solid #032740;
  46. width:250px;
  47. height:250px;
  48. margin-top:10px;
  49. }
  50. div.exampleTitle {
  51. width:250px;
  52. height:30px;
  53. background-color:#032740;
  54. color:#ffffff;
  55. text-align:center;
  56. vertical-align:middle;
  57. line-height: 30px;
  58. }
  59. </style>
  60. <script language="JavaScript">
  61. function loadVis() {
  62. var nodes = [
  63. {id: 1, label: 'Node 1'},
  64. {id: 2, label: 'Node 2'},
  65. {id: 3, label: 'Node 3'},
  66. {id: 4, label: 'Node 4'},
  67. {id: 5, label: 'Node 5'}
  68. ];
  69. // create an array with edges
  70. var edges = [
  71. {from: 1, to: 2},
  72. {from: 1, to: 3},
  73. {from: 2, to: 4},
  74. {from: 2, to: 5}
  75. ];
  76. // create a network
  77. var container = document.getElementById('visualization');
  78. var data = {
  79. nodes: nodes,
  80. edges: edges
  81. };
  82. var network = new vis.Network(container, data, {});
  83. }
  84. </script>
  85. </head>
  86. <body onload="prettyPrint(); loadVis();">
  87. <h1>Network Examples</h1><a class="btn btn-default" href="#allExamples" role="button">View all examples »</a> <a class="btn btn-primary" href="./docs/network.html" role="button">View docs »</a>
  88. <div class="textHTMLContent">This small code example shows the easiest way to get a network up and running. This code has been taken from example 1. The working example is shown next to it.</div>
  89. <pre class="prettyprint lang-html">
  90. &lt;div id="visualization"&gt;&lt;/div&gt;
  91. &lt;script type="text/javascript"&gt;
  92. // create an array with nodes
  93. var nodes = [
  94. {id: 1, label: 'Node 1'},
  95. {id: 2, label: 'Node 2'},
  96. {id: 3, label: 'Node 3'},
  97. {id: 4, label: 'Node 4'},
  98. {id: 5, label: 'Node 5'}
  99. ];
  100. // create an array with edges
  101. var edges = [
  102. {from: 1, to: 2},
  103. {from: 1, to: 3},
  104. {from: 2, to: 4},
  105. {from: 2, to: 5}
  106. ];
  107. // create a network
  108. var container = document.getElementById('mynetwork');
  109. var data = {
  110. nodes: nodes,
  111. edges: edges
  112. };
  113. var network = new vis.Network(container, data, {});
  114. &lt;/script&gt;
  115. </pre>
  116. <div id="visualization"></div>
  117. <h2 id="allExamples">All examples</h2>
  118. <div class="container-fluid">
  119. <div class="col-lg-3 col-md-3 col-sm-6">
  120. <a href="examples/network/01_basic_usage.html">
  121. <img src="./images/gallery/network/1.png" >
  122. <div class="exampleTitle">basic usage</div>
  123. </a>
  124. </div>
  125. <div class="col-lg-3 col-md-3 col-sm-6">
  126. <a href="examples/network/02_random_nodes.html">
  127. <img src="./images/gallery/network/2.png">
  128. <div class="exampleTitle">random nodes</div>
  129. </a>
  130. </div>
  131. <div class="col-lg-3 col-md-3 col-sm-6">
  132. <a href="examples/network/03_images.html">
  133. <img src="./images/gallery/network/3.png">
  134. <div class="exampleTitle">images</div>
  135. </a>
  136. </div>
  137. <div class="col-lg-3 col-md-3 col-sm-6">
  138. <a href="examples/network/04_shapes.html">
  139. <img src="./images/gallery/network/4.png">
  140. <div class="exampleTitle">shapes</div>
  141. </a>
  142. </div>
  143. <div class="col-lg-3 col-md-3 col-sm-6">
  144. <a href="examples/network/05_social_network.html">
  145. <img src="./images/gallery/network/5.png">
  146. <div class="exampleTitle">social network</div>
  147. </a>
  148. </div>
  149. <div class="col-lg-3 col-md-3 col-sm-6">
  150. <a href="examples/network/06_groups.html">
  151. <img src="./images/gallery/network/6.png">
  152. <div class="exampleTitle">groups</div>
  153. </a>
  154. </div>
  155. <div class="col-lg-3 col-md-3 col-sm-6">
  156. <a href="examples/network/07_selections.html">
  157. <img src="./images/gallery/network/7.png">
  158. <div class="exampleTitle">selections</div>
  159. </a>
  160. </div>
  161. <div class="col-lg-3 col-md-3 col-sm-6">
  162. <a href="examples/network/08_mobile_friendly.html">
  163. <img src="./images/gallery/network/8.png">
  164. <div class="exampleTitle">mobile friendly</div>
  165. </a>
  166. </div>
  167. <div class="col-lg-3 col-md-3 col-sm-6">
  168. <a href="examples/network/09_sizing.html">
  169. <img src="./images/gallery/network/9.png">
  170. <div class="exampleTitle">sizing</div>
  171. </a>
  172. </div>
  173. <div class="col-lg-3 col-md-3 col-sm-6">
  174. <a href="examples/network/10_multiline_text.html">
  175. <img src="./images/gallery/network/10.png">
  176. <div class="exampleTitle">multiline text</div>
  177. </a>
  178. </div>
  179. <div class="col-lg-3 col-md-3 col-sm-6">
  180. <a href="examples/network/11_custom_style.html">
  181. <img src="./images/gallery/network/11.png">
  182. <div class="exampleTitle">custom style</div>
  183. </a>
  184. </div>
  185. <div class="col-lg-3 col-md-3 col-sm-6">
  186. <a href="examples/network/12_scalable_images.html">
  187. <img src="./images/gallery/network/12.png">
  188. <div class="exampleTitle">scalable images</div>
  189. </a>
  190. </div>
  191. <div class="col-lg-3 col-md-3 col-sm-6">
  192. <a href="examples/network/13_dashed_lines.html">
  193. <img src="./images/gallery/network/13.png">
  194. <div class="exampleTitle">dashed lines</div>
  195. </a>
  196. </div>
  197. <div class="col-lg-3 col-md-3 col-sm-6">
  198. <a href="examples/network/14_dot_language.html">
  199. <img src="./images/gallery/network/14.png">
  200. <div class="exampleTitle">dot language</div>
  201. </a>
  202. </div>
  203. <div class="col-lg-3 col-md-3 col-sm-6">
  204. <a href="examples/network/15_dot_language_playground.html">
  205. <img src="./images/gallery/network/15.png">
  206. <div class="exampleTitle">playground</div>
  207. </a>
  208. </div>
  209. <div class="col-lg-3 col-md-3 col-sm-6">
  210. <a href="examples/network/16_dynamic_data.html">
  211. <img src="./images/gallery/network/16.png">
  212. <div class="exampleTitle">dynamic data</div>
  213. </a>
  214. </div>
  215. <div class="col-lg-3 col-md-3 col-sm-6">
  216. <a href="examples/network/17_network_info.html">
  217. <img src="./images/gallery/network/17.png">
  218. <div class="exampleTitle">network info</div>
  219. </a>
  220. </div>
  221. <div class="col-lg-3 col-md-3 col-sm-6">
  222. <a href="examples/network/18_fully_random_nodes_clustering.html">
  223. <img src="./images/gallery/network/18.png">
  224. <div class="exampleTitle">fully random nodes clustering</div>
  225. </a>
  226. </div>
  227. <div class="col-lg-3 col-md-3 col-sm-6">
  228. <a href="examples/network/19_scale_free_graph_clustering.html">
  229. <img src="./images/gallery/network/19.png">
  230. <div class="exampleTitle">scale free graph clustering</div>
  231. </a>
  232. </div>
  233. <div class="col-lg-3 col-md-3 col-sm-6">
  234. <a href="examples/network/20_navigation.html">
  235. <img src="./images/gallery/network/20.png">
  236. <div class="exampleTitle">navigation</div>
  237. </a>
  238. </div>
  239. <div class="col-lg-3 col-md-3 col-sm-6">
  240. <a href="examples/network/21_data_manipulation.html">
  241. <img src="./images/gallery/network/21.png">
  242. <div class="exampleTitle">data manipulation</div>
  243. </a>
  244. </div>
  245. <div class="col-lg-3 col-md-3 col-sm-6">
  246. <a href="examples/network/22_les_miserables.html">
  247. <img src="./images/gallery/network/22.png">
  248. <div class="exampleTitle">les miserables</div>
  249. </a>
  250. </div>
  251. <div class="col-lg-3 col-md-3 col-sm-6">
  252. <a href="examples/network/23_hierarchical_layout.html">
  253. <img src="./images/gallery/network/23.png">
  254. <div class="exampleTitle">hierarchical layout</div>
  255. </a>
  256. </div>
  257. <div class="col-lg-3 col-md-3 col-sm-6">
  258. <a href="examples/network/24_hierarchical_layout_userdefined.html">
  259. <img src="./images/gallery/network/24.png">
  260. <div class="exampleTitle">hierarchical layout userdefined</div>
  261. </a>
  262. </div>
  263. <div class="col-lg-3 col-md-3 col-sm-6">
  264. <a href="examples/network/25_physics_configuration.html">
  265. <img src="./images/gallery/network/25.png">
  266. <div class="exampleTitle">physics configuration</div>
  267. </a>
  268. </div>
  269. <div class="col-lg-3 col-md-3 col-sm-6">
  270. <a href="examples/network/26_staticSmoothCurves.html">
  271. <img src="./images/gallery/network/26.png">
  272. <div class="exampleTitle">static smooth curves</div>
  273. </a>
  274. </div>
  275. <div class="col-lg-3 col-md-3 col-sm-6">
  276. <a href="examples/network/27_world_cup_network.html">
  277. <img src="./images/gallery/network/27.png">
  278. <div class="exampleTitle">world cup network</div>
  279. </a>
  280. </div>
  281. <div class="col-lg-3 col-md-3 col-sm-6">
  282. <a href="examples/network/28_world_cup_network_performance.html">
  283. <img src="./images/gallery/network/28.png">
  284. <div class="exampleTitle">world cup network performance</div>
  285. </a>
  286. </div>
  287. <div class="col-lg-3 col-md-3 col-sm-6">
  288. <a href="examples/network/29_neighbourhood_highlight.html">
  289. <img src="./images/gallery/network/29.png">
  290. <div class="exampleTitle">neighborhood highlight</div>
  291. </a>
  292. </div>
  293. <div class="col-lg-3 col-md-3 col-sm-6">
  294. <a href="examples/network/30_importing_from_gephi.html">
  295. <img src="./images/gallery/network/30.png">
  296. <div class="exampleTitle">importing from gephi</div>
  297. </a>
  298. </div>
  299. <div class="col-lg-3 col-md-3 col-sm-6">
  300. <a href="examples/network/31_localization.html">
  301. <img src="./images/gallery/network/31.png">
  302. <div class="exampleTitle">localization</div>
  303. </a>
  304. </div>
  305. <div class="col-lg-3 col-md-3 col-sm-6">
  306. <a href="examples/network/32_hierarchicaLayoutMethods.html">
  307. <img src="./images/gallery/network/32.png">
  308. <div class="exampleTitle">hierarchical layout methods</div>
  309. </a>
  310. </div>
  311. <div class="col-lg-3 col-md-3 col-sm-6">
  312. <a href="examples/network/33_animation.html">
  313. <img src="./images/gallery/network/33.png">
  314. <div class="exampleTitle">animation</div>
  315. </a>
  316. </div>
  317. <div class="col-lg-3 col-md-3 col-sm-6">
  318. <a href="examples/network/graphviz/graphviz_gallery.html">
  319. <img src="./images/gallery/network/graphviz.png">
  320. <div class="exampleTitle">graphviz gallery</div>
  321. </a>
  322. </div>
  323. </div>
  324. <br />
  325. <br />
  326. <br />
  327. <br />
  328. <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
  329. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
  330. <!-- Include all compiled plugins (below), or include individual files as needed -->
  331. <script src="js/bootstrap.min.js"></script>
  332. </body>
  333. </html>