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.

372 lines
16 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. <link rel="icon" HREF="favicon.ico">
  9. <!-- Bootstrap -->
  10. <link href="./css/bootstrap.css" rel="stylesheet">
  11. <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
  12. <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  13. <!--[if lt IE 9]>
  14. <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  15. <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  16. <![endif]-->
  17. <link href="./css/prettify.css" rel="stylesheet" type="text/css" />
  18. <script type="text/javascript" src="./js/prettify/prettify.js"></script>
  19. <script src="./dist/vis.js"></script>
  20. <link href="./dist/vis.css" rel="stylesheet" type="text/css" />
  21. <link href="./css/examples.css" rel="stylesheet" type="text/css" />
  22. <style>
  23. </style>
  24. <script language="JavaScript">
  25. function loadVis() {
  26. var nodes = [
  27. {id: 1, label: 'Node 1'},
  28. {id: 2, label: 'Node 2'},
  29. {id: 3, label: 'Node 3'},
  30. {id: 4, label: 'Node 4'},
  31. {id: 5, label: 'Node 5'}
  32. ];
  33. // create an array with edges
  34. var edges = [
  35. {from: 1, to: 2},
  36. {from: 1, to: 3},
  37. {from: 2, to: 4},
  38. {from: 2, to: 5}
  39. ];
  40. // create a network
  41. var container = document.getElementById('visualization');
  42. var data = {
  43. nodes: nodes,
  44. edges: edges
  45. };
  46. var network = new vis.Network(container, data, {clickToUse:true, stabilize:false});
  47. }
  48. </script>
  49. </head>
  50. <body onload="prettyPrint(); loadVis();">
  51. <div class="navbar-wrapper">
  52. <div class="container">
  53. <nav class="navbar navbar-inverse navbar-static-top" role="navigation">
  54. <div class="container">
  55. <div class="navbar-header">
  56. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
  57. <span class="sr-only">Toggle navigation</span>
  58. <span class="icon-bar"></span>
  59. <span class="icon-bar"></span>
  60. <span class="icon-bar"></span>
  61. </button>
  62. <a class="navbar-brand hidden-sm" href="./index.html">vis.js</a>
  63. </div>
  64. <div id="navbar" class="navbar-collapse collapse">
  65. <ul class="nav navbar-nav">
  66. <li class="active"><a href="./index.html#modules">Modules</a></li>
  67. <li><a href="./docs/index.html" target="_blank">Documentation <img class="icon" src="./images/external-link-icons/external-link-icon-white.png"></a></li>
  68. <li><a href="./blog.html">Blog</a></li>
  69. <li><a href="./index.html#download_install">Download</a></li>
  70. <li><a href="./showcase/index.html">Showcase</a></li>
  71. <li><a href="./index.html#contribute">Contribute</a></li>
  72. <li><a href="./featureRequests.html">Feature requests</a></li>
  73. <li><a href="./index.html#licenses">License</a></li>
  74. </ul>
  75. </div>
  76. </div>
  77. </nav>
  78. </div>
  79. </div>
  80. <div class="contentWrapper">
  81. <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>
  82. <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. (click it to start interacting with it).</div>
  83. <pre class="prettyprint lang-html">
  84. &lt;div id="visualization"&gt;&lt;/div&gt;
  85. &lt;script type="text/javascript"&gt;
  86. // create an array with nodes
  87. var nodes = [
  88. {id: 1, label: 'Node 1'},
  89. {id: 2, label: 'Node 2'},
  90. {id: 3, label: 'Node 3'},
  91. {id: 4, label: 'Node 4'},
  92. {id: 5, label: 'Node 5'}
  93. ];
  94. // create an array with edges
  95. var edges = [
  96. {from: 1, to: 2},
  97. {from: 1, to: 3},
  98. {from: 2, to: 4},
  99. {from: 2, to: 5}
  100. ];
  101. // create a network
  102. var container = document.getElementById('mynetwork');
  103. var data = {
  104. nodes: nodes,
  105. edges: edges
  106. };
  107. var network = new vis.Network(container, data, {});
  108. &lt;/script&gt;
  109. </pre>
  110. <div id="visualization"></div>
  111. <h2 id="allExamples">All examples</h2>
  112. <div class="container-fluid">
  113. <div class="col-lg-2 col-md-3 col-sm-6">
  114. <a href="examples/network/01_basic_usage.html">
  115. <img class="example img-responsive" src="./images/exampleScreenshots/network/1.png" >
  116. <div class="exampleTitle">basic usage</div>
  117. </a>
  118. </div>
  119. <div class="col-lg-2 col-md-3 col-sm-6">
  120. <a href="examples/network/02_random_nodes.html">
  121. <img class="example img-responsive" src="./images/exampleScreenshots/network/2.png">
  122. <div class="exampleTitle">random nodes</div>
  123. </a>
  124. </div>
  125. <div class="col-lg-2 col-md-3 col-sm-6">
  126. <a href="examples/network/03_images.html">
  127. <img class="example img-responsive" src="./images/exampleScreenshots/network/3.png">
  128. <div class="exampleTitle">images</div>
  129. </a>
  130. </div>
  131. <div class="col-lg-2 col-md-3 col-sm-6">
  132. <a href="examples/network/04_shapes.html">
  133. <img class="example img-responsive" src="./images/exampleScreenshots/network/4.png">
  134. <div class="exampleTitle">shapes</div>
  135. </a>
  136. </div>
  137. <div class="col-lg-2 col-md-3 col-sm-6">
  138. <a href="examples/network/05_social_network.html">
  139. <img class="example img-responsive" src="./images/exampleScreenshots/network/5.png">
  140. <div class="exampleTitle">social network</div>
  141. </a>
  142. </div>
  143. <div class="col-lg-2 col-md-3 col-sm-6">
  144. <a href="examples/network/06_groups.html">
  145. <img class="example img-responsive" src="./images/exampleScreenshots/network/6.png">
  146. <div class="exampleTitle">groups</div>
  147. </a>
  148. </div>
  149. <div class="col-lg-2 col-md-3 col-sm-6">
  150. <a href="examples/network/07_selections.html">
  151. <img class="example img-responsive" src="./images/exampleScreenshots/network/7.png">
  152. <div class="exampleTitle">selections</div>
  153. </a>
  154. </div>
  155. <div class="col-lg-2 col-md-3 col-sm-6">
  156. <a href="examples/network/08_mobile_friendly.html">
  157. <img class="example img-responsive" src="./images/exampleScreenshots/network/8.png">
  158. <div class="exampleTitle">mobile friendly</div>
  159. </a>
  160. </div>
  161. <div class="col-lg-2 col-md-3 col-sm-6">
  162. <a href="examples/network/09_sizing.html">
  163. <img class="example img-responsive" src="./images/exampleScreenshots/network/9.png">
  164. <div class="exampleTitle">sizing</div>
  165. </a>
  166. </div>
  167. <div class="col-lg-2 col-md-3 col-sm-6">
  168. <a href="examples/network/10_multiline_text.html">
  169. <img class="example img-responsive" src="./images/exampleScreenshots/network/10.png">
  170. <div class="exampleTitle">multiline text</div>
  171. </a>
  172. </div>
  173. <div class="col-lg-2 col-md-3 col-sm-6">
  174. <a href="examples/network/11_custom_style.html">
  175. <img class="example img-responsive" src="./images/exampleScreenshots/network/11.png">
  176. <div class="exampleTitle">custom style</div>
  177. </a>
  178. </div>
  179. <div class="col-lg-2 col-md-3 col-sm-6">
  180. <a href="examples/network/12_scalable_images.html">
  181. <img class="example img-responsive" src="./images/exampleScreenshots/network/12.png">
  182. <div class="exampleTitle">scalable images</div>
  183. </a>
  184. </div>
  185. <div class="col-lg-2 col-md-3 col-sm-6">
  186. <a href="examples/network/13_dashed_lines.html">
  187. <img class="example img-responsive" src="./images/exampleScreenshots/network/13.png">
  188. <div class="exampleTitle">dashed lines</div>
  189. </a>
  190. </div>
  191. <div class="col-lg-2 col-md-3 col-sm-6">
  192. <a href="examples/network/14_dot_language.html">
  193. <img class="example img-responsive" src="./images/exampleScreenshots/network/14.png">
  194. <div class="exampleTitle">dot language</div>
  195. </a>
  196. </div>
  197. <div class="col-lg-2 col-md-3 col-sm-6">
  198. <a href="examples/network/15_dot_language_playground.html">
  199. <img class="example img-responsive" src="./images/exampleScreenshots/network/15.png">
  200. <div class="exampleTitle">playground</div>
  201. </a>
  202. </div>
  203. <div class="col-lg-2 col-md-3 col-sm-6">
  204. <a href="examples/network/16_dynamic_data.html">
  205. <img class="example img-responsive" src="./images/exampleScreenshots/network/16.png">
  206. <div class="exampleTitle">dynamic data</div>
  207. </a>
  208. </div>
  209. <div class="col-lg-2 col-md-3 col-sm-6">
  210. <a href="examples/network/17_network_info.html">
  211. <img class="example img-responsive" src="./images/exampleScreenshots/network/17.png">
  212. <div class="exampleTitle">network info</div>
  213. </a>
  214. </div>
  215. <div class="col-lg-2 col-md-3 col-sm-6">
  216. <a href="examples/network/18_fully_random_nodes_clustering.html">
  217. <img class="example img-responsive" src="./images/exampleScreenshots/network/18.png">
  218. <div class="exampleTitle">fully random nodes clustering</div>
  219. </a>
  220. </div>
  221. <div class="col-lg-2 col-md-3 col-sm-6">
  222. <a href="examples/network/19_scale_free_graph_clustering.html">
  223. <img class="example img-responsive" src="./images/exampleScreenshots/network/19.png">
  224. <div class="exampleTitle">scale free graph clustering</div>
  225. </a>
  226. </div>
  227. <div class="col-lg-2 col-md-3 col-sm-6">
  228. <a href="examples/network/20_navigation.html">
  229. <img class="example img-responsive" src="./images/exampleScreenshots/network/20.png">
  230. <div class="exampleTitle">navigation</div>
  231. </a>
  232. </div>
  233. <div class="col-lg-2 col-md-3 col-sm-6">
  234. <a href="examples/network/21_data_manipulation.html">
  235. <img class="example img-responsive" src="./images/exampleScreenshots/network/21.png">
  236. <div class="exampleTitle">data manipulation</div>
  237. </a>
  238. </div>
  239. <div class="col-lg-2 col-md-3 col-sm-6">
  240. <a href="examples/network/22_les_miserables.html">
  241. <img class="example img-responsive" src="./images/exampleScreenshots/network/22.png">
  242. <div class="exampleTitle">les miserables</div>
  243. </a>
  244. </div>
  245. <div class="col-lg-2 col-md-3 col-sm-6">
  246. <a href="examples/network/23_hierarchical_layout.html">
  247. <img class="example img-responsive" src="./images/exampleScreenshots/network/23.png">
  248. <div class="exampleTitle">hierarchical layout</div>
  249. </a>
  250. </div>
  251. <div class="col-lg-2 col-md-3 col-sm-6">
  252. <a href="examples/network/24_hierarchical_layout_userdefined.html">
  253. <img class="example img-responsive" src="./images/exampleScreenshots/network/24.png">
  254. <div class="exampleTitle">hierarchical layout userdefined</div>
  255. </a>
  256. </div>
  257. <div class="col-lg-2 col-md-3 col-sm-6">
  258. <a href="examples/network/25_physics_configuration.html">
  259. <img class="example img-responsive" src="./images/exampleScreenshots/network/25.png">
  260. <div class="exampleTitle">physics configuration</div>
  261. </a>
  262. </div>
  263. <div class="col-lg-2 col-md-3 col-sm-6">
  264. <a href="examples/network/26_staticSmoothCurves.html">
  265. <img class="example img-responsive" src="./images/exampleScreenshots/network/26.png">
  266. <div class="exampleTitle">static smooth curves</div>
  267. </a>
  268. </div>
  269. <div class="col-lg-2 col-md-3 col-sm-6">
  270. <a href="examples/network/27_world_cup_network.html">
  271. <img class="example img-responsive" src="./images/exampleScreenshots/network/27.png">
  272. <div class="exampleTitle">world cup network</div>
  273. </a>
  274. </div>
  275. <div class="col-lg-2 col-md-3 col-sm-6">
  276. <a href="examples/network/28_world_cup_network_performance.html">
  277. <img class="example img-responsive" src="./images/exampleScreenshots/network/28.png">
  278. <div class="exampleTitle">world cup network performance</div>
  279. </a>
  280. </div>
  281. <div class="col-lg-2 col-md-3 col-sm-6">
  282. <a href="examples/network/29_neighbourhood_highlight.html">
  283. <img class="example img-responsive" src="./images/exampleScreenshots/network/29.png">
  284. <div class="exampleTitle">neighborhood highlight</div>
  285. </a>
  286. </div>
  287. <div class="col-lg-2 col-md-3 col-sm-6">
  288. <a href="examples/network/30_importing_from_gephi.html">
  289. <img class="example img-responsive" src="./images/exampleScreenshots/network/30.png">
  290. <div class="exampleTitle">importing from gephi</div>
  291. </a>
  292. </div>
  293. <div class="col-lg-2 col-md-3 col-sm-6">
  294. <a href="examples/network/31_localization.html">
  295. <img class="example img-responsive" src="./images/exampleScreenshots/network/31.png">
  296. <div class="exampleTitle">localization</div>
  297. </a>
  298. </div>
  299. <div class="col-lg-2 col-md-3 col-sm-6">
  300. <a href="examples/network/32_hierarchicaLayoutMethods.html">
  301. <img class="example img-responsive" src="./images/exampleScreenshots/network/32.png">
  302. <div class="exampleTitle">hierarchical layout methods</div>
  303. </a>
  304. </div>
  305. <div class="col-lg-2 col-md-3 col-sm-6">
  306. <a href="examples/network/33_animation.html">
  307. <img class="example img-responsive" src="./images/exampleScreenshots/network/33.png">
  308. <div class="exampleTitle">animation</div>
  309. </a>
  310. </div>
  311. <div class="col-lg-2 col-md-3 col-sm-6">
  312. <a href="examples/network/34_circular_images.html">
  313. <img class="example img-responsive" src="./images/exampleScreenshots/network/34.png">
  314. <div class="exampleTitle">circular images</div>
  315. </a>
  316. </div>
  317. <div class="col-lg-2 col-md-3 col-sm-6">
  318. <a href="examples/network/35_label_stroke.html">
  319. <img class="example img-responsive" src="./images/exampleScreenshots/network/35.png">
  320. <div class="exampleTitle">label stroke</div>
  321. </a>
  322. </div>
  323. <div class="col-lg-2 col-md-3 col-sm-6">
  324. <a href="examples/network/36_HTML_in_Nodes.html">
  325. <img class="example img-responsive" src="./images/exampleScreenshots/network/36.png">
  326. <div class="exampleTitle">HTML in nodes!</div>
  327. </a>
  328. </div>
  329. <div class="col-lg-2 col-md-3 col-sm-6">
  330. <a href="examples/network/37_label_alignment.html">
  331. <img class="example img-responsive" src="./images/exampleScreenshots/network/37.png">
  332. <div class="exampleTitle">labelAlignment for edges</div>
  333. </a>
  334. </div>
  335. <div class="col-lg-2 col-md-3 col-sm-6">
  336. <a href="examples/network/38_node_as_icon.html">
  337. <img class="example img-responsive" src="./images/exampleScreenshots/network/38.png">
  338. <div class="exampleTitle">node as icon</div>
  339. </a>
  340. </div>
  341. <div class="col-lg-2 col-md-3 col-sm-6">
  342. <a href="examples/network/graphviz/graphviz_gallery.html">
  343. <img class="example img-responsive" src="./images/exampleScreenshots/network/graphviz.png">
  344. <div class="exampleTitle">graphviz examples</div>
  345. </a>
  346. </div>
  347. </div>
  348. <br />
  349. <br />
  350. <br />
  351. <br />
  352. </div>
  353. <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
  354. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
  355. <!-- Include all compiled plugins (below), or include individual files as needed -->
  356. <script src="js/bootstrap.min.js"></script>
  357. </body>
  358. </html>