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.

686 lines
30 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. 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. size: 25,
  169. title: undefined,
  170. value: undefined,
  171. x: undefined,
  172. y: undefined
  173. }
  174. }
  175. network.setOptions(options);
  176. </pre>
  177. <pre class="prettyprint lang-js options top hidden" id="shortOptions">
  178. // only the options that have shorthand notations are shown.
  179. var options = {
  180. nodes:{
  181. color: '#ff0000',
  182. fixed: false,
  183. font: '12px arial red',
  184. scaling: {
  185. label: true
  186. },
  187. shadow: true
  188. }
  189. }
  190. network.setOptions(options);
  191. </pre>
  192. <p>These options can also be set per individual node. All of the individual options are explained here:</p>
  193. <table class="options" id="optionTable">
  194. <tr>
  195. <th>Name</th>
  196. <th>Type</th>
  197. <th>Default</th>
  198. <th>Description</th>
  199. </tr>
  200. <tr>
  201. <td>borderWidth</td>
  202. <td>Number</td>
  203. <td><code>1</code></td>
  204. <td>The width of the border of the node.</td>
  205. </tr>
  206. <tr>
  207. <td>borderWidthSelected</td>
  208. <td>Number</td>
  209. <td><code>undefined</code></td>
  210. <td>The width of the border of the node when it is selected. When undefined, the borderWidth is used</td>
  211. </tr>
  212. <tr>
  213. <td>brokenImage</td>
  214. <td>String</td>
  215. <td><code>undefined</code></td>
  216. <td>When the shape is set to <code>image</code> or <code>circularImage</code>, this option can be an URL to
  217. a backup image in case the URL supplied in the image option cannot be resolved.
  218. </td>
  219. </tr>
  220. <tr class='toggle collapsible' onclick="toggleTable('optionTable','color', this);">
  221. <td><span parent="color" class="right-caret"></span> color</td>
  222. <td>Object or String</td>
  223. <td><code>Object</code></td>
  224. <td>The color object contains the color information of the node in every situation. When the node only needs
  225. a single color, a color value like <code>'rgba(120,32,14,1)'</code>, <code>'#ffffff'</code> or <code>'red'</code>
  226. can be supplied instead of an object.
  227. </td>
  228. </tr>
  229. <tr parent="color" class="hidden">
  230. <td class="indent">color.border</td>
  231. <td>String</td>
  232. <td><code>'#2B7CE9'</code></td>
  233. <td>The color of the border of the node when it is not selected or hovered over <i>(assuming hover is
  234. enabled in the interaction module)</i>.
  235. </td>
  236. </tr>
  237. <tr parent="color" class="hidden">
  238. <td class="indent">color.background</td>
  239. <td>String</td>
  240. <td><code>'#D2E5FF'</code></td>
  241. <td>The color of the background of the node when it is not selected or hovered over <i>(assuming hover is
  242. enabled in the interaction module)</i>.
  243. </td>
  244. </tr>
  245. <tr parent="color" class="hidden">
  246. <td class="indent">color.highlight</td>
  247. <td>Object or String</td>
  248. <td><code>Object</code></td>
  249. <td>The color the node when it is selected. Alternatively you can just supply a string color value.</td>
  250. </tr>
  251. <tr parent="color" class="hidden">
  252. <td class="indent2">color.highlight.border</td>
  253. <td>String</td>
  254. <td><code>'#2B7CE9'</code></td>
  255. <td>The color of the border of the node when it is selected.</td>
  256. </tr>
  257. <tr parent="color" class="hidden">
  258. <td class="indent2">color.highlight.background</td>
  259. <td>String</td>
  260. <td><code>'#D2E5FF'</code></td>
  261. <td>The color of the background of the node when it is selected.</td>
  262. </tr>
  263. <tr parent="color" class="hidden">
  264. <td class="indent">color.hover</td>
  265. <td>Object or String</td>
  266. <td><code>Object</code></td>
  267. <td>The color the node when the mouse hovers over it <i>(assuming hover is enabled in the interaction
  268. module)</i>. Shorthand like above is also supported.
  269. </td>
  270. </tr>
  271. <tr parent="color" class="hidden">
  272. <td class="indent2">color.hover.border</td>
  273. <td>String</td>
  274. <td><code>'#2B7CE9'</code></td>
  275. <td>The color of the border of the node when the mouse hovers over it <i>(assuming hover is enabled in the
  276. interaction module)</i>.
  277. </td>
  278. </tr>
  279. <tr parent="color" class="hidden">
  280. <td class="indent2">color.hover.background</td>
  281. <td>String</td>
  282. <td><code>'#D2E5FF'</code></td>
  283. <td>The color of the background of the node when the mouse hovers over it <i>(assuming hover is enabled in
  284. the interaction module)</i>.
  285. </td>
  286. </tr>
  287. <tr class='toggle collapsible' onclick="toggleTable('optionTable','fixed', this);">
  288. <td><span parent="fixed" class="right-caret"></span> fixed</td>
  289. <td>Object or Boolean</td>
  290. <td><code>Object</code></td>
  291. <td>When true, the node will not move but IS part of the physics simulation. When defined as an object,
  292. movement in either X or Y direction can be disabled.
  293. </td>
  294. </tr>
  295. <tr parent="fixed" class="hidden">
  296. <td class="indent">fixed.x</td>
  297. <td>Boolean</td>
  298. <td><code>false</code></td>
  299. <td>When true, the node will not move in the X direction.</td>
  300. </tr>
  301. <tr parent="fixed" class="hidden">
  302. <td class="indent">fixed.y</td>
  303. <td>Boolean</td>
  304. <td><code>false</code></td>
  305. <td>When true, the node will not move in the Y direction.</td>
  306. </tr>
  307. <tr class='toggle collapsible' onclick="toggleTable('optionTable','font', this);">
  308. <td><span parent="font" class="right-caret"></span> font</td>
  309. <td>Object or String</td>
  310. <td><code>false</code></td>
  311. <td>This object defines the details of the label. A shorthand is also supported in the form <code>'size face
  312. color'</code> for example: <code>'14px arial red'</code>.
  313. </td>
  314. </tr>
  315. <tr parent="font" class="hidden">
  316. <td class="indent">font.color</td>
  317. <td>String</td>
  318. <td><code>'#343434'</code></td>
  319. <td>Color of the label text.</td>
  320. </tr>
  321. <tr parent="font" class="hidden">
  322. <td class="indent">font.size</td>
  323. <td>Number</td>
  324. <td><code>14</code></td>
  325. <td>Size of the label text.</td>
  326. </tr>
  327. <tr parent="font" class="hidden">
  328. <td class="indent">font.face</td>
  329. <td>String</td>
  330. <td><code>'arial'</code></td>
  331. <td>Font face (or font family) of the label text.</td>
  332. </tr>
  333. <tr parent="font" class="hidden">
  334. <td class="indent">font.background</td>
  335. <td>String</td>
  336. <td><code>undefined</code></td>
  337. <td>When not <code>undefined</code> but a <b>color string</b>, a background rectangle will be drawn behind
  338. the label in the supplied color.
  339. </td>
  340. </tr>
  341. <tr parent="font" class="hidden">
  342. <td class="indent">font.strokeWidth</td>
  343. <td>Number</td>
  344. <td><code>0</code></td>
  345. <td>As an alternative to the background rectangle, a stroke can be drawn around the text. When a value
  346. higher than 0 is supplied, the stroke will be drawn.
  347. </td>
  348. </tr>
  349. <tr parent="font" class="hidden">
  350. <td class="indent">font.strokeColor</td>
  351. <td>String</td>
  352. <td><code>'#ffffff'</code></td>
  353. <td>This is the color of the stroke <i>assuming the value for stroke is higher than 0</i>.</td>
  354. </tr>
  355. <tr>
  356. <td>group</td>
  357. <td>String</td>
  358. <td><code>undefined</code></td>
  359. <td>When not <code>undefined</code>, the</td>
  360. </tr>
  361. <tr>
  362. <td>hidden</td>
  363. <td>Boolean</td>
  364. <td><code>false</code></td>
  365. <td>When true, the node will not be shown. It will still be part of the physics simulation though!</td>
  366. </tr>
  367. <tr class='toggle collapsible' onclick="toggleTable('optionTable','icon', this);">
  368. <td><span parent="icon" class="right-caret"></span> icon</td>
  369. <td>Object</td>
  370. <td><code>Object</code></td>
  371. <td>These options are only used when the shape is set to <code>icon</code>.</td>
  372. </tr>
  373. <tr parent="icon" class="hidden">
  374. <td class="indent">icon.face</td>
  375. <td>String</td>
  376. <td><code>'FontAwesome'</code></td>
  377. <td>These options are only used when the shape is set to <code>icon</code>. The possible options for the
  378. face are: <code>'FontAwesome'</code> and <code>'Ionicons'</code>.
  379. </td>
  380. </tr>
  381. <tr parent="icon" class="hidden">
  382. <td class="indent">icon.code</td>
  383. <td>String</td>
  384. <td><code>undefined</code></td>
  385. <td>This is the code of the icon, for example <code>'\uf007'</code>.</td>
  386. </tr>
  387. <tr parent="icon" class="hidden">
  388. <td class="indent">icon.size</td>
  389. <td>Number</td>
  390. <td><code>50</code></td>
  391. <td>The size of the icon.</td>
  392. </tr>
  393. <tr parent="icon" class="hidden">
  394. <td class="indent">icon.color</td>
  395. <td>String</td>
  396. <td><code>'#2B7CE9'</code></td>
  397. <td>The color of the icon.</td>
  398. </tr>
  399. <tr>
  400. <td>id</td>
  401. <td>String</td>
  402. <td><code>undefined</code></td>
  403. <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>
  404. </tr>
  405. <tr>
  406. <td>image</td>
  407. <td>String</td>
  408. <td><code>undefined</code></td>
  409. <td>When the shape is set to <code>image</code> or <code>circularImage</code>, this option should be the URL
  410. to an image. If the image cannot be found, the brokenImage option can be used.
  411. </td>
  412. </tr>
  413. <tr>
  414. <td>label</td>
  415. <td>String</td>
  416. <td><code>undefined</code></td>
  417. <td>The label is the piece of text shown in or under the node, depending on the shape.</td>
  418. </tr>
  419. <tr>
  420. <td>labelHighlightBold</td>
  421. <td>Boolean</td>
  422. <td><code>true</code></td>
  423. <td>Determines whether or not the label becomes bold when the node is selected.</td>
  424. </tr>
  425. <tr>
  426. <td>level</td>
  427. <td>Number</td>
  428. <td><code>undefined</code></td>
  429. <td>When using the hierarchical layout, the level determines where the node is going to be positioned.</td>
  430. </tr>
  431. <tr>
  432. <td>mass</td>
  433. <td>Number</td>
  434. <td><code>1</code></td>
  435. <td>The barnesHut physics model (which is enabled by default) is based on an inverted gravity model. By
  436. increasing the mass of a node, you increase it's repulsion. Values lower than 1 are not recommended.
  437. </td>
  438. </tr>
  439. <tr>
  440. <td>physics</td>
  441. <td>Boolean</td>
  442. <td><code>true</code></td>
  443. <td>When false, the node is not part of the physics simulation. It will not move except for from manual
  444. dragging.
  445. </td>
  446. </tr>
  447. <tr class='toggle collapsible' onclick="toggleTable('optionTable','scaling', this);">
  448. <td><span parent="scaling" class="right-caret"></span> scaling</td>
  449. <td>Object</td>
  450. <td><code>Object</code></td>
  451. <td>If the <code>value</code> option is specified, the size of the nodes will be scaled according to the
  452. properties in this object. All node shapes can be scaled, but some only when label scaling is enabled as
  453. their size is based on the size of the label.
  454. Only scalable when label scaling is enabled are:
  455. <code>ellipse</code>, <code>circle</code>, <code>database</code>, <code>box</code>, <code>text</code>.
  456. Always scalable are:
  457. <code>image</code>, <code>circularImage</code>, <code>diamond</code>, <code>dot</code>,
  458. <code>star</code>, <code>triangle</code>, <code>triangleDown</code>, <code>square</code> and
  459. <code>icon</code>. Keep in mind that when using scaling, the <code>size</code> option is neglected.
  460. </td>
  461. </tr>
  462. <tr parent="scaling" class="hidden">
  463. <td class="indent">scaling.min</td>
  464. <td>Number</td>
  465. <td><code>10</code></td>
  466. <td>If nodes have a value, their sizes are determined by the value, the scaling function and the min max
  467. values. The min value is the minimum allowed value.
  468. </td>
  469. </tr>
  470. <tr parent="scaling" class="hidden">
  471. <td class="indent">scaling.max</td>
  472. <td>Number</td>
  473. <td><code>30</code></td>
  474. <td>This is the maximum allowed size when the nodes are scaled using the value option.</td>
  475. </tr>
  476. <tr parent="scaling" class="hidden">
  477. <td class="indent">scaling.label</td>
  478. <td>Object or Boolean</td>
  479. <td><code>Object</code></td>
  480. <td>This can be false if the label is not allowed to scale with the node. If true it will scale using
  481. default settigns. For further customization, you can supply an object.
  482. </td>
  483. </tr>
  484. <tr parent="scaling" class="hidden">
  485. <td class="indent2">scaling.label.enabled</td>
  486. <td>Boolean</td>
  487. <td><code>false</code></td>
  488. <td>Toggle the scaling of the label on or off. If this option is not defined, it is set to true if any of
  489. the properties in this object are defined.
  490. </td>
  491. </tr>
  492. <tr parent="scaling" class="hidden">
  493. <td class="indent2">scaling.label.min</td>
  494. <td>Number</td>
  495. <td><code>14</code></td>
  496. <td>The minimum font-size used for labels when scaling.</td>
  497. </tr>
  498. <tr parent="scaling" class="hidden">
  499. <td class="indent2">scaling.label.max</td>
  500. <td>Number</td>
  501. <td><code>30</code></td>
  502. <td>The maximum font-size used for labels when scaling.</td>
  503. </tr>
  504. <tr parent="scaling" class="hidden">
  505. <td class="indent2">scaling.label.maxVisible</td>
  506. <td>Number</td>
  507. <td><code>30</code></td>
  508. <td>When zooming in, the font is drawn larger as well. You can limit the perceived font size using this
  509. option. If set to 30, the font will never look larger than size 30 zoomed at 100%.
  510. </td>
  511. </tr>
  512. <tr parent="scaling" class="hidden">
  513. <td class="indent2">scaling.label.drawThreshold</td>
  514. <td>Number</td>
  515. <td><code>5</code></td>
  516. <td>When zooming out, the font will be drawn smaller. This defines a lower limit for when the font is drawn.
  517. When using font scaling, you can use this together with the maxVisible to first show labels of important
  518. nodes when zoomed out and only show the rest when zooming in.
  519. </td>
  520. </tr>
  521. <tr parent="scaling" class="hidden">
  522. <td class="indent">scaling.customScalingFunction</td>
  523. <td>Function</td>
  524. <td>in description</td>
  525. <td>If nodes have <code>value</code> fields, this function determines how the size of the nodes are scaled
  526. based on their values. The default function is:
  527. <pre>
  528. function (min,max,total,value) {
  529. if (max === min) {
  530. return 0.5;
  531. }
  532. else {
  533. var scale = 1 / (max - min);
  534. return Math.max(0,(value - min)*scale);
  535. }
  536. }
  537. </pre>
  538. The function receives the minimum value of the set, the maximum value, the total sum of all values and
  539. finally the value of the node or edge it works on. <b>It has to return a value between 0 and 1.</b> The
  540. nodes and edges then calculate their size as follows:
  541. <pre>
  542. var scale = customScalingFunction(min,max,total,value);
  543. var diff = maxSize - minSize;
  544. mySize = minSize + diff * scale;
  545. </pre>
  546. Please note: <code>maxSize</code> and <code>minSize</code> are the values <code>scaling.max</code>
  547. and <code>scaling.min</code> provided in the options.
  548. </td>
  549. </tr>
  550. <tr class='toggle collapsible' onclick="toggleTable('optionTable','shadow', this);">
  551. <td><span parent="shadow" class="right-caret"></span> shadow</td>
  552. <td>Object or Boolean</td>
  553. <td><code>Object</code></td>
  554. <td>When true, the node casts a shadow using the default settings. This can be further refined by supplying
  555. an object.
  556. </td>
  557. </tr>
  558. <tr parent="shadow" class="hidden">
  559. <td class="indent">shadow.enabled</td>
  560. <td>Boolean</td>
  561. <td><code>false</code></td>
  562. <td>Toggle the casting of shadows. If this option is not defined, it is set to true if any of the properties
  563. in this object are defined.
  564. </td>
  565. </tr>
  566. <tr parent="shadow" class="hidden">
  567. <td class="indent">shadow.size</td>
  568. <td>Number</td>
  569. <td><code>10</code></td>
  570. <td>The blur size of the shadow.</td>
  571. </tr>
  572. <tr parent="shadow" class="hidden">
  573. <td class="indent">shadow.x</td>
  574. <td>Number</td>
  575. <td><code>5</code></td>
  576. <td>The x offset.</td>
  577. </tr>
  578. <tr parent="shadow" class="hidden">
  579. <td class="indent">shadow.y</td>
  580. <td>Number</td>
  581. <td><code>5</code></td>
  582. <td>The y offset.</td>
  583. </tr>
  584. <tr>
  585. <td>shape</td>
  586. <td>String</td>
  587. <td><code>'ellipse'</code></td>
  588. <td>The shape defines what the node looks like. There are two types of nodes. One type has the label inside
  589. of it and the other type has the label underneath it. The types with the label inside of it are:
  590. <code>ellipse</code>, <code>circle</code>, <code>database</code>, <code>box</code>, <code>text</code>.
  591. The ones with the label outside of it are: <code>image</code>, <code>circularImage</code>,
  592. <code>diamond</code>, <code>dot</code>, <code>star</code>, <code>triangle</code>,
  593. <code>triangleDown</code>, <code>square</code> and <code>icon</code>.
  594. </td>
  595. </tr>
  596. <tr class='toggle collapsible' onclick="toggleTable('optionTable','shapeProperties', this);">
  597. <td><span parent="shapeProperties" class="right-caret"></span> shapeProperties</td>
  598. <td>Object</td>
  599. <td><code>Object</code></td>
  600. <td>This object contains configuration for specific shapes
  601. </td>
  602. </tr>
  603. <tr parent="shapeProperties" class="hidden">
  604. <td class="indent">shapeProperties.borderDashes</td>
  605. <td>Array or Boolean</td>
  606. <td><code>false</code></td>
  607. <td>This property applies to all shapes that have borders.
  608. You set the dashes by supplying an Array. Array formart: [dash length, gap length].
  609. </td>
  610. </tr>
  611. <tr>
  612. <td>size</td>
  613. <td>Number</td>
  614. <td><code>25</code></td>
  615. <td>The size is used to determine the size of node shapes that do not have the label inside of them. These
  616. shapes are: <code>image</code>, <code>circularImage</code>, <code>diamond</code>, <code>dot</code>,
  617. <code>star</code>, <code>triangle</code>, <code>triangleDown</code>, <code>square</code> and
  618. <code>icon</code></td>
  619. </tr>
  620. <tr>
  621. <td>title</td>
  622. <td>String or Element</td>
  623. <td><code>undefined</code></td>
  624. <td>Title to be displayed when the user hovers over the node. The title can be an HTML element or a string
  625. containing plain text or HTML.
  626. </td>
  627. </tr>
  628. <tr>
  629. <td>value</td>
  630. <td>Number</td>
  631. <td><code>undefined</code></td>
  632. <td>When a value is set, the nodes will be scaled using the options in the scaling object defined above.
  633. </td>
  634. </tr>
  635. <tr>
  636. <td>x</td>
  637. <td>Number</td>
  638. <td><code>undefined</code></td>
  639. <td>This gives a node an initial x position. When using the hierarchical layout, either the x or y position
  640. is set by the layout engine depending on the type of view. The other value remains untouched. When using
  641. stabilization, the stabilized position may be different from the initial one. To lock the node to that
  642. position use the physics or fixed options.
  643. </td>
  644. </tr>
  645. <tr>
  646. <td>y</td>
  647. <td>Number</td>
  648. <td><code>undefined</code></td>
  649. <td>This gives a node an initial y position. When using the hierarchical layout, either the x or y position
  650. is set by the layout engine depending on the type of view. The other value remains untouched. When using
  651. stabilization, the stabilized position may be different from the initial one. To lock the node to that
  652. position use the physics or fixed options.
  653. </td>
  654. </tr>
  655. </table>
  656. </div>
  657. <!-- Bootstrap core JavaScript
  658. ================================================== -->
  659. <!-- Placed at the end of the document so the pages load faster -->
  660. <script src="../js/jquery.min.js"></script>
  661. <script src="../js/bootstrap.min.js"></script>
  662. <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
  663. <script src="../js/ie10-viewport-bug-workaround.js"></script>
  664. <!-- jquery extensions -->
  665. <script src="../js/jquery.highlight.js"></script>
  666. <script src="../js/jquery.url.min.js"></script>
  667. <!-- Tipue vendor js -->
  668. <script src="../js/tipuesearch.config.js"></script>
  669. <script src="../js/tipuesearch.js"></script>
  670. <!-- controller -->
  671. <script src="../js/main.js"></script>