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.

357 lines
14 KiB

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