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.

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