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

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