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.

176 lines
7.4 KiB

9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
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. <meta name="description" content="">
  8. <meta name="author" content="">
  9. <link rel="icon" HREF="favicon.ico">
  10. <title>vis.js - Groups documentation.</title>
  11. <!-- Bootstrap core CSS -->
  12. <link href="../css/bootstrap.css" rel="stylesheet">
  13. <!-- Tipue vendor css -->
  14. <link href="../css/tipuesearch.css" rel="stylesheet">
  15. <link href="../css/style.css" rel="stylesheet">
  16. <link href="../css/prettify.css" type="text/css" rel="stylesheet" />
  17. <script type="text/javascript" src="../js/toggleTable.js"></script>
  18. <script type="text/javascript" src="../js/googleAnalytics.js"></script>
  19. <script type="text/javascript" src="../js/prettify/prettify.js"></script>
  20. <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
  21. <!--[if lt IE 9]>
  22. <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  23. <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  24. <![endif]-->
  25. <script src="../js/smooth-scroll.min.js"></script>
  26. <script language="JavaScript">
  27. smoothScroll.init();
  28. </script>
  29. <style>
  30. </style>
  31. </head>
  32. <body onload="prettyPrint();">
  33. <div class="navbar-wrapper">
  34. <div class="container">
  35. <nav class="navbar navbar-inverse navbar-static-top" role="navigation">
  36. <div class="container">
  37. <div class="navbar-header">
  38. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
  39. aria-expanded="false" aria-controls="navbar">
  40. <span class="sr-only">Toggle navigation</span>
  41. <span class="icon-bar"></span>
  42. <span class="icon-bar"></span>
  43. <span class="icon-bar"></span>
  44. </button>
  45. <a class="navbar-brand hidden-sm" href="./index.html">vis.js</a>
  46. </div>
  47. <div id="navbar" class="navbar-collapse collapse">
  48. <ul class="nav navbar-nav">
  49. <li><a href="http://www.visjs.org/index.html#modules">Modules</a></li>
  50. <li><a href="http://www.visjs.org/blog.html">Blog</a></li>
  51. <li><a href="http://www.visjs.org/index.html#download_install">Download</a></li>
  52. <li><a href="http://www.visjs.org/showcase/index.html">Showcase</a></li>
  53. <li><a href="http://www.visjs.org/index.html#contribute">Contribute</a></li>
  54. <li><a href="http://www.visjs.org/index.html#licenses">License</a></li>
  55. </ul>
  56. <form class="navbar-form navbar-right" role="search">
  57. <input name="q" id="tipue_search_input" autocomplete="off" type="text" class="form-control" placeholder="Enter keywords">
  58. <button type="button" class="btn btn-default" onclick="vis.initSiteSearch(true);">Go!</button>
  59. </form>
  60. <div id="search-results-wrapper" class="panel panel-default">
  61. <div class="panel-body">
  62. <div id="tipue_search_content"></div>
  63. </div>
  64. </div>
  65. <div id="keyword-info" class="panel panel-success">
  66. <div class="panel-body">
  67. Found <span id="keyword-count"></span> results. Click <a id="keyword-jumper-button" href="">here</a> to jump to the first keyword occurence!
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. </nav>
  73. </div>
  74. </div>
  75. <a href="https://github.com/almende/vis" class="hidden-xs hidden-sm hidden-md"><img
  76. style="position: absolute; top: 0; right: 0; border: 0;"
  77. src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67"
  78. alt="Fork me on GitHub"
  79. data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
  80. <div class="container full">
  81. <h1>Network - groups</h1>
  82. <p>Handles the group styling.</p>
  83. <h3>Options</h3>
  84. <p>The options for the canvas have to be contained in an object titled 'groups'.</p>
  85. <p>Click on the options shown to show how these options are supposed to be used.</p>
  86. <ul class="nav nav-tabs">
  87. <li role="presentation" class="active" onclick="toggleTab(this)"><a href="#">options hidden</a></li>
  88. <li role="presentation" onclick="toggleTab(this);" targetNode="fullOptions"><a href="#">options shown</a></li>
  89. </ul>
  90. <br>
  91. <pre class="prettyprint lang-js options hidden" id="fullOptions">
  92. var options = {
  93. groups:{
  94. useDefaultGroups: true,
  95. myGroupId:{
  96. /*node options*/
  97. }
  98. }
  99. }
  100. network.setOptions(options);
  101. </pre>
  102. <p>All of the individual options are explained here:</p>
  103. <table class="options">
  104. <tr>
  105. <th>Name</th>
  106. <th>Type</th>
  107. <th>Default</th>
  108. <th>Description</th>
  109. </tr>
  110. <tr>
  111. <td>useDefaultGroups</td>
  112. <td>Boolean</td>
  113. <td><code>true</code></td>
  114. <td>If your nodes have groups defined that are not in the Groups module, the module loops over the groups it
  115. does have, allocating one for each unknown group. When all are used, it goes back to the first group. By
  116. setting this to false, the default groups will not be used in this cycle.
  117. </td>
  118. </tr>
  119. <tr>
  120. <td>group*</td>
  121. <td>Object</td>
  122. <td><code></code></td>
  123. <td>
  124. You can add multiple groups containing styling information that applies to a certain subset of groups.
  125. All options described in the <a href="./nodes.html">nodes module</a> that make sense can be used here
  126. (you're not going to set the same id or x,y position for a group of nodes).
  127. Example:
  128. <pre class="prettyprint lang-js options">
  129. var nodes = [
  130. {id:1, group:'myGroup', label:"I'm in a custom group called 'myGroup'!"}
  131. ]
  132. var options = {
  133. groups: {
  134. myGroup: {color:{background:'red'}, borderWidth:3}
  135. }
  136. }
  137. </pre>
  138. *) the option is not called group, as shown by the example but can by any custom id, except for
  139. 'useDefaultGroups'.
  140. </td>
  141. </tr>
  142. </table>
  143. </div>
  144. <!-- Bootstrap core JavaScript
  145. ================================================== -->
  146. <!-- Placed at the end of the document so the pages load faster -->
  147. <script src="../js/jquery.min.js"></script>
  148. <script src="../js/bootstrap.min.js"></script>
  149. <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
  150. <script src="../js/ie10-viewport-bug-workaround.js"></script>
  151. <!-- jquery extensions -->
  152. <script src="../js/jquery.highlight.js"></script>
  153. <script src="../js/jquery.url.min.js"></script>
  154. <!-- Tipue vendor js -->
  155. <script src="../js/tipuesearch.config.js"></script>
  156. <script src="../js/tipuesearch.js"></script>
  157. <!-- controller -->
  158. <script src="../js/main.js"></script>