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.

709 lines
31 KiB

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 - Nodes 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. <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
  17. <!--[if lt IE 9]>
  18. <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  19. <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  20. <![endif]-->
  21. <link href="../css/prettify.css" type="text/css" rel="stylesheet"/>
  22. <script type="text/javascript" src="../js/googleAnalytics.js"></script>
  23. <script type="text/javascript" src="../js/prettify/prettify.js"></script>
  24. <script src="../js/smooth-scroll.min.js"></script>
  25. <script language="JavaScript">
  26. smoothScroll.init();
  27. </script>
  28. <script type="text/javascript" src="../js/toggleTable.js"></script>
  29. </head>
  30. <body onload="prettyPrint();">
  31. <div class="navbar-wrapper">
  32. <div class="container">
  33. <nav class="navbar navbar-inverse navbar-static-top" role="navigation">
  34. <div class="container">
  35. <div class="navbar-header">
  36. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
  37. aria-expanded="false" aria-controls="navbar">
  38. <span class="sr-only">Toggle navigation</span>
  39. <span class="icon-bar"></span>
  40. <span class="icon-bar"></span>
  41. <span class="icon-bar"></span>
  42. </button>
  43. <a class="navbar-brand hidden-sm" href="./index.html">vis.js</a>
  44. </div>
  45. <div id="navbar" class="navbar-collapse collapse">
  46. <ul class="nav navbar-nav">
  47. <li><a href="http://www.visjs.org/index.html#modules">Modules</a></li>
  48. <li><a href="http://www.visjs.org/blog.html">Blog</a></li>
  49. <li><a href="http://www.visjs.org/index.html#download_install">Download</a></li>
  50. <li><a href="http://www.visjs.org/showcase/index.html">Showcase</a></li>
  51. <li><a href="http://www.visjs.org/index.html#contribute">Contribute</a></li>
  52. <li><a href="http://www.visjs.org/featureRequests.html">Feature requests</a></li>
  53. <li><a href="http://www.visjs.org/index.html#licenses">License</a></li>
  54. </ul>
  55. <form class="navbar-form navbar-right" role="search">
  56. <input name="q" id="tipue_search_input" autocomplete="off" type="text" class="form-control" placeholder="Enter keywords">
  57. <button type="button" class="btn btn-default" onclick="vis.initSiteSearch(true);">Go!</button>
  58. </form>
  59. <div id="search-results-wrapper" class="panel panel-default">
  60. <div class="panel-body">
  61. <div id="tipue_search_content"></div>
  62. </div>
  63. </div>
  64. <div id="keyword-info" class="panel panel-success">
  65. <div class="panel-body">
  66. Found <span id="keyword-count"></span> results. Click <a id="keyword-jumper-button" href="">here</a> to jump to the first keyword occurence!
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. </nav>
  72. </div>
  73. </div>
  74. <a href="https://github.com/almende/vis" class="hidden-xs hidden-sm hidden-md"><img
  75. style="position: absolute; top: 0; right: 0; border: 0;"
  76. src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67"
  77. alt="Fork me on GitHub"
  78. data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
  79. <div class="container full">
  80. <h1>Network - nodes</h1>
  81. <p>Handles the creation and deletion of nodes and contains the global node options and styles.</p>
  82. <h3>Options</h3>
  83. <p>The options for the nodes have to be contained in an object titled 'nodes'. All of these options can be supplied per node as well. Obviously, 'id' should not be defined globally but per node. Options defined
  84. in the global nodes object, are applied to all nodes. If a node has options of its own, those will be used instead of the global options.</p>
  85. <p><b><i>When you have given a node an option, you will override the global option for that property, and also the group option for that property if the node is in a group. If you then set that option to <code>null</code>,
  86. it will revert back to the default value.</i></b>
  87. </p>
  88. <p>Click on the full options or shorthand options to show how these options are supposed to be used.</p>
  89. <ul class="nav nav-tabs">
  90. <li role="presentation" class="active" onclick="toggleTab(this)"><a href="#">options hidden</a></li>
  91. <li role="presentation" onclick="toggleTab(this);" targetNode="fullOptions"><a href="#">full options</a></li>
  92. <li role="presentation" onclick="toggleTab(this);" targetNode="shortOptions"><a href="#">shorthand options</a></li>
  93. </ul>
  94. <br>
  95. <pre class="prettyprint lang-js options top hidden" id="fullOptions">
  96. // these are all options in full.
  97. var options = {
  98. nodes:{
  99. borderWidth: 1,
  100. borderWidthSelected: undefined,
  101. brokenImage:undefined,
  102. color: {
  103. border: '#2B7CE9',
  104. background: '#97C2FC',
  105. highlight: {
  106. border: '#2B7CE9',
  107. background: '#D2E5FF'
  108. },
  109. hover: {
  110. border: '#2B7CE9',
  111. background: '#D2E5FF'
  112. }
  113. },
  114. fixed: {
  115. x:false,
  116. y:false
  117. },
  118. font: {
  119. color: '#343434',
  120. size: 14, // px
  121. face: 'arial',
  122. background: 'none',
  123. strokeWidth: 0, // px
  124. strokeColor: '#ffffff',
  125. align: 'horizontal'
  126. },
  127. group: undefined,
  128. hidden: false,
  129. icon: {
  130. face: 'FontAwesome',
  131. code: undefined,
  132. size: 50, //50,
  133. color:'#2B7CE9'
  134. },
  135. image: undefined,
  136. label: undefined,
  137. labelHighlightBold: true,
  138. level: undefined,
  139. mass: 1,
  140. physics: true,
  141. scaling: {
  142. min: 10,
  143. max: 30,
  144. label: {
  145. enabled: false,
  146. min: 14,
  147. max: 30,
  148. maxVisible: 30,
  149. drawThreshold: 5
  150. },
  151. customScalingFunction: function (min,max,total,value) {
  152. if (max === min) {
  153. return 0.5;
  154. }
  155. else {
  156. let scale = 1 / (max - min);
  157. return Math.max(0,(value - min)*scale);
  158. }
  159. }
  160. },
  161. shadow:{
  162. enabled: false,
  163. size:10,
  164. x:5,
  165. y:5
  166. },
  167. shape: 'ellipse',
  168. shapeProperties: {
  169. borderDashes: false, // only for shapes with a border
  170. borderRadius: 6 // only for box shape
  171. }
  172. size: 25,
  173. title: undefined,
  174. value: undefined,
  175. x: undefined,
  176. y: undefined
  177. }
  178. }
  179. network.setOptions(options);
  180. </pre>
  181. <pre class="prettyprint lang-js options top hidden" id="shortOptions">
  182. // only the options that have shorthand notations are shown.
  183. var options = {
  184. nodes:{
  185. color: '#ff0000',
  186. fixed: false,
  187. font: '12px arial red',
  188. scaling: {
  189. label: true
  190. },
  191. shadow: true
  192. }
  193. }
  194. network.setOptions(options);
  195. </pre>
  196. <p>These options can also be set per individual node. All of the individual options are explained here:</p>
  197. <table class="options" id="optionTable">
  198. <tr>
  199. <th>Name</th>
  200. <th>Type</th>
  201. <th>Default</th>
  202. <th>Description</th>
  203. </tr>
  204. <tr>
  205. <td>borderWidth</td>
  206. <td>Number</td>
  207. <td><code>1</code></td>
  208. <td>The width of the border of the node.</td>
  209. </tr>
  210. <tr>
  211. <td>borderWidthSelected</td>
  212. <td>Number</td>
  213. <td><code>undefined</code></td>
  214. <td>The width of the border of the node when it is selected. When undefined, the borderWidth is used</td>
  215. </tr>
  216. <tr>
  217. <td>brokenImage</td>
  218. <td>String</td>
  219. <td><code>undefined</code></td>
  220. <td>When the shape is set to <code>image</code> or <code>circularImage</code>, this option can be an URL to
  221. a backup image in case the URL supplied in the image option cannot be resolved.
  222. </td>
  223. </tr>
  224. <tr class='toggle collapsible' onclick="toggleTable('optionTable','color', this);">
  225. <td><span parent="color" class="right-caret"></span> color</td>
  226. <td>Object or String</td>
  227. <td><code>Object</code></td>
  228. <td>The color object contains the color information of the node in every situation. When the node only needs
  229. a single color, a color value like <code>'rgba(120,32,14,1)'</code>, <code>'#ffffff'</code> or <code>'red'</code>
  230. can be supplied instead of an object.
  231. </td>
  232. </tr>
  233. <tr parent="color" class="hidden">
  234. <td class="indent">color.border</td>
  235. <td>String</td>
  236. <td><code>'#2B7CE9'</code></td>
  237. <td>The color of the border of the node when it is not selected or hovered over <i>(assuming hover is
  238. enabled in the interaction module)</i>.
  239. </td>
  240. </tr>
  241. <tr parent="color" class="hidden">
  242. <td class="indent">color.background</td>
  243. <td>String</td>
  244. <td><code>'#D2E5FF'</code></td>
  245. <td>The color of the background of the node when it is not selected or hovered over <i>(assuming hover is
  246. enabled in the interaction module)</i>.
  247. </td>
  248. </tr>
  249. <tr parent="color" class="hidden">
  250. <td class="indent">color.highlight</td>
  251. <td>Object or String</td>
  252. <td><code>Object</code></td>
  253. <td>The color the node when it is selected. Alternatively you can just supply a string color value.</td>
  254. </tr>
  255. <tr parent="color" class="hidden">
  256. <td class="indent2">color.highlight.border</td>
  257. <td>String</td>
  258. <td><code>'#2B7CE9'</code></td>
  259. <td>The color of the border of the node when it is selected.</td>
  260. </tr>
  261. <tr parent="color" class="hidden">
  262. <td class="indent2">color.highlight.background</td>
  263. <td>String</td>
  264. <td><code>'#D2E5FF'</code></td>
  265. <td>The color of the background of the node when it is selected.</td>
  266. </tr>
  267. <tr parent="color" class="hidden">
  268. <td class="indent">color.hover</td>
  269. <td>Object or String</td>
  270. <td><code>Object</code></td>
  271. <td>The color the node when the mouse hovers over it <i>(assuming hover is enabled in the interaction
  272. module)</i>. Shorthand like above is also supported.
  273. </td>
  274. </tr>
  275. <tr parent="color" class="hidden">
  276. <td class="indent2">color.hover.border</td>
  277. <td>String</td>
  278. <td><code>'#2B7CE9'</code></td>
  279. <td>The color of the border of the node when the mouse hovers over it <i>(assuming hover is enabled in the
  280. interaction module)</i>.
  281. </td>
  282. </tr>
  283. <tr parent="color" class="hidden">
  284. <td class="indent2">color.hover.background</td>
  285. <td>String</td>
  286. <td><code>'#D2E5FF'</code></td>
  287. <td>The color of the background of the node when the mouse hovers over it <i>(assuming hover is enabled in
  288. the interaction module)</i>.
  289. </td>
  290. </tr>
  291. <tr class='toggle collapsible' onclick="toggleTable('optionTable','fixed', this);">
  292. <td><span parent="fixed" class="right-caret"></span> fixed</td>
  293. <td>Object or Boolean</td>
  294. <td><code>Object</code></td>
  295. <td>When true, the node will not move but IS part of the physics simulation. When defined as an object,
  296. movement in either X or Y direction can be disabled.
  297. </td>
  298. </tr>
  299. <tr parent="fixed" class="hidden">
  300. <td class="indent">fixed.x</td>
  301. <td>Boolean</td>
  302. <td><code>false</code></td>
  303. <td>When true, the node will not move in the X direction.</td>
  304. </tr>
  305. <tr parent="fixed" class="hidden">
  306. <td class="indent">fixed.y</td>
  307. <td>Boolean</td>
  308. <td><code>false</code></td>
  309. <td>When true, the node will not move in the Y direction.</td>
  310. </tr>
  311. <tr class='toggle collapsible' onclick="toggleTable('optionTable','font', this);">
  312. <td><span parent="font" class="right-caret"></span> font</td>
  313. <td>Object or String</td>
  314. <td><code>false</code></td>
  315. <td>This object defines the details of the label. A shorthand is also supported in the form <code>'size face
  316. color'</code> for example: <code>'14px arial red'</code>.
  317. </td>
  318. </tr>
  319. <tr parent="font" class="hidden">
  320. <td class="indent">font.color</td>
  321. <td>String</td>
  322. <td><code>'#343434'</code></td>
  323. <td>Color of the label text.</td>
  324. </tr>
  325. <tr parent="font" class="hidden">
  326. <td class="indent">font.size</td>
  327. <td>Number</td>
  328. <td><code>14</code></td>
  329. <td>Size of the label text.</td>
  330. </tr>
  331. <tr parent="font" class="hidden">
  332. <td class="indent">font.face</td>
  333. <td>String</td>
  334. <td><code>'arial'</code></td>
  335. <td>Font face (or font family) of the label text.</td>
  336. </tr>
  337. <tr parent="font" class="hidden">
  338. <td class="indent">font.background</td>
  339. <td>String</td>
  340. <td><code>undefined</code></td>
  341. <td>When not <code>undefined</code> but a <b>color string</b>, a background rectangle will be drawn behind
  342. the label in the supplied color.
  343. </td>
  344. </tr>
  345. <tr parent="font" class="hidden">
  346. <td class="indent">font.strokeWidth</td>
  347. <td>Number</td>
  348. <td><code>0</code></td>
  349. <td>As an alternative to the background rectangle, a stroke can be drawn around the text. When a value
  350. higher than 0 is supplied, the stroke will be drawn.
  351. </td>
  352. </tr>
  353. <tr parent="font" class="hidden">
  354. <td class="indent">font.strokeColor</td>
  355. <td>String</td>
  356. <td><code>'#ffffff'</code></td>
  357. <td>This is the color of the stroke <i>assuming the value for stroke is higher than 0</i>.</td>
  358. </tr>
  359. <tr>
  360. <td>group</td>
  361. <td>String</td>
  362. <td><code>undefined</code></td>
  363. <td>When not <code>undefined</code>, the node will belong to the defined group. Styling information of
  364. that group will apply to this node. Node specific styling overrides group styling.
  365. </td>
  366. </tr>
  367. <tr>
  368. <td>hidden</td>
  369. <td>Boolean</td>
  370. <td><code>false</code></td>
  371. <td>When true, the node will not be shown. It will still be part of the physics simulation though!</td>
  372. </tr>
  373. <tr class='toggle collapsible' onclick="toggleTable('optionTable','icon', this);">
  374. <td><span parent="icon" class="right-caret"></span> icon</td>
  375. <td>Object</td>
  376. <td><code>Object</code></td>
  377. <td>These options are only used when the shape is set to <code>icon</code>.</td>
  378. </tr>
  379. <tr parent="icon" class="hidden">
  380. <td class="indent">icon.face</td>
  381. <td>String</td>
  382. <td><code>'FontAwesome'</code></td>
  383. <td>These options are only used when the shape is set to <code>icon</code>. The possible options for the
  384. face are: <code>'FontAwesome'</code> and <code>'Ionicons'</code>.
  385. </td>
  386. </tr>
  387. <tr parent="icon" class="hidden">
  388. <td class="indent">icon.code</td>
  389. <td>String</td>
  390. <td><code>undefined</code></td>
  391. <td>This is the code of the icon, for example <code>'\uf007'</code>.</td>
  392. </tr>
  393. <tr parent="icon" class="hidden">
  394. <td class="indent">icon.size</td>
  395. <td>Number</td>
  396. <td><code>50</code></td>
  397. <td>The size of the icon.</td>
  398. </tr>
  399. <tr parent="icon" class="hidden">
  400. <td class="indent">icon.color</td>
  401. <td>String</td>
  402. <td><code>'#2B7CE9'</code></td>
  403. <td>The color of the icon.</td>
  404. </tr>
  405. <tr>
  406. <td>id</td>
  407. <td>String</td>
  408. <td><code>undefined</code></td>
  409. <td>The id of the node. The id is mandatory for nodes and they have to be unique. This should obviously be set per node, not globally.</td>
  410. </tr>
  411. <tr>
  412. <td>image</td>
  413. <td>String</td>
  414. <td><code>undefined</code></td>
  415. <td>When the shape is set to <code>image</code> or <code>circularImage</code>, this option should be the URL
  416. to an image. If the image cannot be found, the brokenImage option can be used.
  417. </td>
  418. </tr>
  419. <tr>
  420. <td>label</td>
  421. <td>String</td>
  422. <td><code>undefined</code></td>
  423. <td>The label is the piece of text shown in or under the node, depending on the shape.</td>
  424. </tr>
  425. <tr>
  426. <td>labelHighlightBold</td>
  427. <td>Boolean</td>
  428. <td><code>true</code></td>
  429. <td>Determines whether or not the label becomes bold when the node is selected.</td>
  430. </tr>
  431. <tr>
  432. <td>level</td>
  433. <td>Number</td>
  434. <td><code>undefined</code></td>
  435. <td>When using the hierarchical layout, the level determines where the node is going to be positioned.</td>
  436. </tr>
  437. <tr>
  438. <td>mass</td>
  439. <td>Number</td>
  440. <td><code>1</code></td>
  441. <td>The barnesHut physics model (which is enabled by default) is based on an inverted gravity model. By
  442. increasing the mass of a node, you increase it's repulsion. Values lower than 1 are not recommended.
  443. </td>
  444. </tr>
  445. <tr>
  446. <td>physics</td>
  447. <td>Boolean</td>
  448. <td><code>true</code></td>
  449. <td>When false, the node is not part of the physics simulation. It will not move except for from manual
  450. dragging.
  451. </td>
  452. </tr>
  453. <tr class='toggle collapsible' onclick="toggleTable('optionTable','scaling', this);">
  454. <td><span parent="scaling" class="right-caret"></span> scaling</td>
  455. <td>Object</td>
  456. <td><code>Object</code></td>
  457. <td>If the <code>value</code> option is specified, the size of the nodes will be scaled according to the
  458. properties in this object. All node shapes can be scaled, but some only when label scaling is enabled as
  459. their size is based on the size of the label.
  460. Only scalable when label scaling is enabled are:
  461. <code>ellipse</code>, <code>circle</code>, <code>database</code>, <code>box</code>, <code>text</code>.
  462. Always scalable are:
  463. <code>image</code>, <code>circularImage</code>, <code>diamond</code>, <code>dot</code>,
  464. <code>star</code>, <code>triangle</code>, <code>triangleDown</code>, <code>square</code> and
  465. <code>icon</code>. Keep in mind that when using scaling, the <code>size</code> option is neglected.
  466. </td>
  467. </tr>
  468. <tr parent="scaling" class="hidden">
  469. <td class="indent">scaling.min</td>
  470. <td>Number</td>
  471. <td><code>10</code></td>
  472. <td>If nodes have a value, their sizes are determined by the value, the scaling function and the min max
  473. values. The min value is the minimum allowed value.
  474. </td>
  475. </tr>
  476. <tr parent="scaling" class="hidden">
  477. <td class="indent">scaling.max</td>
  478. <td>Number</td>
  479. <td><code>30</code></td>
  480. <td>This is the maximum allowed size when the nodes are scaled using the value option.</td>
  481. </tr>
  482. <tr parent="scaling" class="hidden">
  483. <td class="indent">scaling.label</td>
  484. <td>Object or Boolean</td>
  485. <td><code>Object</code></td>
  486. <td>This can be false if the label is not allowed to scale with the node. If true it will scale using
  487. default settigns. For further customization, you can supply an object.
  488. </td>
  489. </tr>
  490. <tr parent="scaling" class="hidden">
  491. <td class="indent2">scaling.label.enabled</td>
  492. <td>Boolean</td>
  493. <td><code>false</code></td>
  494. <td>Toggle the scaling of the label on or off. If this option is not defined, it is set to true if any of
  495. the properties in this object are defined.
  496. </td>
  497. </tr>
  498. <tr parent="scaling" class="hidden">
  499. <td class="indent2">scaling.label.min</td>
  500. <td>Number</td>
  501. <td><code>14</code></td>
  502. <td>The minimum font-size used for labels when scaling.</td>
  503. </tr>
  504. <tr parent="scaling" class="hidden">
  505. <td class="indent2">scaling.label.max</td>
  506. <td>Number</td>
  507. <td><code>30</code></td>
  508. <td>The maximum font-size used for labels when scaling.</td>
  509. </tr>
  510. <tr parent="scaling" class="hidden">
  511. <td class="indent2">scaling.label.maxVisible</td>
  512. <td>Number</td>
  513. <td><code>30</code></td>
  514. <td>When zooming in, the font is drawn larger as well. You can limit the perceived font size using this
  515. option. If set to 30, the font will never look larger than size 30 zoomed at 100%.
  516. </td>
  517. </tr>
  518. <tr parent="scaling" class="hidden">
  519. <td class="indent2">scaling.label.drawThreshold</td>
  520. <td>Number</td>
  521. <td><code>5</code></td>
  522. <td>When zooming out, the font will be drawn smaller. This defines a lower limit for when the font is drawn.
  523. When using font scaling, you can use this together with the maxVisible to first show labels of important
  524. nodes when zoomed out and only show the rest when zooming in.
  525. </td>
  526. </tr>
  527. <tr parent="scaling" class="hidden">
  528. <td class="indent">scaling.customScalingFunction</td>
  529. <td>Function</td>
  530. <td>in description</td>
  531. <td>If nodes have <code>value</code> fields, this function determines how the size of the nodes are scaled
  532. based on their values. The default function is:
  533. <pre>
  534. function (min,max,total,value) {
  535. if (max === min) {
  536. return 0.5;
  537. }
  538. else {
  539. var scale = 1 / (max - min);
  540. return Math.max(0,(value - min)*scale);
  541. }
  542. }
  543. </pre>
  544. The function receives the minimum value of the set, the maximum value, the total sum of all values and
  545. finally the value of the node or edge it works on. <b>It has to return a value between 0 and 1.</b> The
  546. nodes and edges then calculate their size as follows:
  547. <pre>
  548. var scale = customScalingFunction(min,max,total,value);
  549. var diff = maxSize - minSize;
  550. mySize = minSize + diff * scale;
  551. </pre>
  552. Please note: <code>maxSize</code> and <code>minSize</code> are the values <code>scaling.max</code>
  553. and <code>scaling.min</code> provided in the options.
  554. </td>
  555. </tr>
  556. <tr class='toggle collapsible' onclick="toggleTable('optionTable','shadow', this);">
  557. <td><span parent="shadow" class="right-caret"></span> shadow</td>
  558. <td>Object or Boolean</td>
  559. <td><code>Object</code></td>
  560. <td>When true, the node casts a shadow using the default settings. This can be further refined by supplying
  561. an object.
  562. </td>
  563. </tr>
  564. <tr parent="shadow" class="hidden">
  565. <td class="indent">shadow.enabled</td>
  566. <td>Boolean</td>
  567. <td><code>false</code></td>
  568. <td>Toggle the casting of shadows. If this option is not defined, it is set to true if any of the properties
  569. in this object are defined.
  570. </td>
  571. </tr>
  572. <tr parent="shadow" class="hidden">
  573. <td class="indent">shadow.size</td>
  574. <td>Number</td>
  575. <td><code>10</code></td>
  576. <td>The blur size of the shadow.</td>
  577. </tr>
  578. <tr parent="shadow" class="hidden">
  579. <td class="indent">shadow.x</td>
  580. <td>Number</td>
  581. <td><code>5</code></td>
  582. <td>The x offset.</td>
  583. </tr>
  584. <tr parent="shadow" class="hidden">
  585. <td class="indent">shadow.y</td>
  586. <td>Number</td>
  587. <td><code>5</code></td>
  588. <td>The y offset.</td>
  589. </tr>
  590. <tr>
  591. <td>shape</td>
  592. <td>String</td>
  593. <td><code>'ellipse'</code></td>
  594. <td>The shape defines what the node looks like. There are two types of nodes. One type has the label inside
  595. of it and the other type has the label underneath it. The types with the label inside of it are:
  596. <code>ellipse</code>, <code>circle</code>, <code>database</code>, <code>box</code>, <code>text</code>.
  597. The ones with the label outside of it are: <code>image</code>, <code>circularImage</code>,
  598. <code>diamond</code>, <code>dot</code>, <code>star</code>, <code>triangle</code>,
  599. <code>triangleDown</code>, <code>square</code> and <code>icon</code>.
  600. </td>
  601. </tr>
  602. <tr class='toggle collapsible' onclick="toggleTable('optionTable','shapeProperties', this);">
  603. <td><span parent="shapeProperties" class="right-caret"></span> shapeProperties</td>
  604. <td>Object</td>
  605. <td><code>Object</code></td>
  606. <td>This object contains configuration for specific shapes
  607. </td>
  608. </tr>
  609. <tr parent="shapeProperties" class="hidden">
  610. <td class="indent">shapeProperties.borderDashes</td>
  611. <td>Array or Boolean</td>
  612. <td><code>false</code></td>
  613. <td>This property applies to all shapes that have borders.
  614. You set the dashes by supplying an Array. Array formart: [dash length, gap length].
  615. You can also use a Boolean, false is disable and true is default [5,15].
  616. </td>
  617. </tr>
  618. <tr parent="shapeProperties" class="hidden">
  619. <td class="indent">shapeProperties.borderRadius</td>
  620. <td>Number</td>
  621. <td><code>6</code></td>
  622. <td>This property is used only for the <code>box</code> shape. It allows you to determine the roundness of the corners of the shape.
  623. </td>
  624. </tr>
  625. <tr parent="shapeProperties" class="hidden">
  626. <td class="indent">shapeProperties.useImageSize</td>
  627. <td>Boolean</td>
  628. <td><code>false</code></td>
  629. <td>This property only applies to the <code>image</code> and <code>circularImage</code> shapes. When false, the size option is used, when true, the size of the image is used. <br><i><b>Important</b>:
  630. if this is set to true, the image cannot be scaled with the value option!</i>
  631. </td>
  632. </tr>
  633. <tr>
  634. <td>size</td>
  635. <td>Number</td>
  636. <td><code>25</code></td>
  637. <td>The size is used to determine the size of node shapes that do not have the label inside of them. These
  638. shapes are: <code>image</code>, <code>circularImage</code>, <code>diamond</code>, <code>dot</code>,
  639. <code>star</code>, <code>triangle</code>, <code>triangleDown</code>, <code>square</code> and
  640. <code>icon</code></td>
  641. </tr>
  642. <tr>
  643. <td>title</td>
  644. <td>String or Element</td>
  645. <td><code>undefined</code></td>
  646. <td>Title to be displayed when the user hovers over the node. The title can be an HTML element or a string
  647. containing plain text or HTML.
  648. </td>
  649. </tr>
  650. <tr>
  651. <td>value</td>
  652. <td>Number</td>
  653. <td><code>undefined</code></td>
  654. <td>When a value is set, the nodes will be scaled using the options in the scaling object defined above.
  655. </td>
  656. </tr>
  657. <tr>
  658. <td>x</td>
  659. <td>Number</td>
  660. <td><code>undefined</code></td>
  661. <td>This gives a node an initial x position. When using the hierarchical layout, either the x or y position
  662. is set by the layout engine depending on the type of view. The other value remains untouched. When using
  663. stabilization, the stabilized position may be different from the initial one. To lock the node to that
  664. position use the physics or fixed options.
  665. </td>
  666. </tr>
  667. <tr>
  668. <td>y</td>
  669. <td>Number</td>
  670. <td><code>undefined</code></td>
  671. <td>This gives a node an initial y position. When using the hierarchical layout, either the x or y position
  672. is set by the layout engine depending on the type of view. The other value remains untouched. When using
  673. stabilization, the stabilized position may be different from the initial one. To lock the node to that
  674. position use the physics or fixed options.
  675. </td>
  676. </tr>
  677. </table>
  678. </div>
  679. <!-- Bootstrap core JavaScript
  680. ================================================== -->
  681. <!-- Placed at the end of the document so the pages load faster -->
  682. <script src="../js/jquery.min.js"></script>
  683. <script src="../js/bootstrap.min.js"></script>
  684. <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
  685. <script src="../js/ie10-viewport-bug-workaround.js"></script>
  686. <!-- jquery extensions -->
  687. <script src="../js/jquery.highlight.js"></script>
  688. <script src="../js/jquery.url.min.js"></script>
  689. <!-- Tipue vendor js -->
  690. <script src="../js/tipuesearch.config.js"></script>
  691. <script src="../js/tipuesearch.js"></script>
  692. <!-- controller -->
  693. <script src="../js/main.js"></script>