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.

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