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.

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