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
  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/featureRequests.html">Feature requests</a></li>
  55. <li><a href="http://www.visjs.org/index.html#licenses">License</a></li>
  56. </ul>
  57. <form class="navbar-form navbar-right" role="search">
  58. <input name="q" id="tipue_search_input" autocomplete="off" type="text" class="form-control" placeholder="Enter keywords">
  59. <button type="submit" class="btn btn-default">Go!</button>
  60. </form>
  61. <div id="search-results-wrapper" class="panel panel-default">
  62. <div class="panel-body">
  63. <div id="tipue_search_content"></div>
  64. </div>
  65. </div>
  66. <div id="keyword-info" class="panel panel-success">
  67. <div class="panel-body">
  68. Found <span id="keyword-count"></span> results. Click <a id="keyword-jumper-button" href="">here</a> to jump to the first keyword occurence!
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. </nav>
  74. </div>
  75. </div>
  76. <a href="https://github.com/almende/vis" class="hidden-xs hidden-sm hidden-md"><img
  77. style="position: absolute; top: 0; right: 0; border: 0;"
  78. src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67"
  79. alt="Fork me on GitHub"
  80. data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
  81. <div class="container full">
  82. <h1>Network - groups</h1>
  83. <p>Handles the group styling.</p>
  84. <h3>Options</h3>
  85. <p>The options for the canvas have to be contained in an object titled 'groups'.</p>
  86. <p>Click on the options shown to show how these options are supposed to be used.</p>
  87. <ul class="nav nav-tabs">
  88. <li role="presentation" class="active" onclick="toggleTab(this)"><a href="#">options hidden</a></li>
  89. <li role="presentation" onclick="toggleTab(this);" targetNode="fullOptions"><a href="#">options shown</a></li>
  90. </ul>
  91. <br>
  92. <pre class="prettyprint lang-js options hidden" id="fullOptions">
  93. var options = {
  94. groups:{
  95. useDefaultGroups: true,
  96. myGroupId:{
  97. /*node options*/
  98. }
  99. }
  100. }
  101. network.setOptions(options);
  102. </pre>
  103. <p>All of the individual options are explained here:</p>
  104. <table class="options">
  105. <tr>
  106. <th>Name</th>
  107. <th>Type</th>
  108. <th>Default</th>
  109. <th>Description</th>
  110. </tr>
  111. <tr>
  112. <td>useDefaultGroups</td>
  113. <td>Boolean</td>
  114. <td><code>true</code></td>
  115. <td>If your nodes have groups defined that are not in the Groups module, the module loops over the groups it
  116. does have, allocating one for each unknown group. When all are used, it goes back to the first group. By
  117. setting this to false, the default groups will not be used in this cycle.
  118. </td>
  119. </tr>
  120. <tr>
  121. <td>group*</td>
  122. <td>Object</td>
  123. <td><code></code></td>
  124. <td>
  125. You can add multiple groups containing styling information that applies to a certain subset of groups.
  126. All options described in the <a href="./nodes.html">nodes module</a> that make sense can be used here
  127. (you're not going to set the same id or x,y position for a group of nodes).
  128. Example:
  129. <pre class="prettyprint lang-js options">
  130. var nodes = [
  131. {id:1, group:'myGroup', label:"I'm in a custom group called 'myGroup'!"}
  132. ]
  133. var options = {
  134. groups: {
  135. myGroup: {color:{background:'red'}, borderWidth:3}
  136. }
  137. }
  138. </pre>
  139. *) the option is not called group, as shown by the example but can by any custom id, except for
  140. 'useDefaultGroups'.
  141. </td>
  142. </tr>
  143. </table>
  144. </div>
  145. <!-- Bootstrap core JavaScript
  146. ================================================== -->
  147. <!-- Placed at the end of the document so the pages load faster -->
  148. <script src="../js/jquery.min.js"></script>
  149. <script src="../js/bootstrap.min.js"></script>
  150. <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
  151. <script src="../js/ie10-viewport-bug-workaround.js"></script>
  152. <!-- jquery extensions -->
  153. <script src="../js/jquery.highlight.js"></script>
  154. <script src="../js/jquery.url.min.js"></script>
  155. <!-- Tipue vendor js -->
  156. <script src="../js/tipuesearch.config.js"></script>
  157. <script src="../js/tipuesearch.min.js"></script>
  158. <!-- controller -->
  159. <script src="../js/main.js"></script>