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.

706 lines
31 KiB

9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
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 - 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. 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</td>
  364. </tr>
  365. <tr>
  366. <td>hidden</td>
  367. <td>Boolean</td>
  368. <td><code>false</code></td>
  369. <td>When true, the node will not be shown. It will still be part of the physics simulation though!</td>
  370. </tr>
  371. <tr class='toggle collapsible' onclick="toggleTable('optionTable','icon', this);">
  372. <td><span parent="icon" class="right-caret"></span> icon</td>
  373. <td>Object</td>
  374. <td><code>Object</code></td>
  375. <td>These options are only used when the shape is set to <code>icon</code>.</td>
  376. </tr>
  377. <tr parent="icon" class="hidden">
  378. <td class="indent">icon.face</td>
  379. <td>String</td>
  380. <td><code>'FontAwesome'</code></td>
  381. <td>These options are only used when the shape is set to <code>icon</code>. The possible options for the
  382. face are: <code>'FontAwesome'</code> and <code>'Ionicons'</code>.
  383. </td>
  384. </tr>
  385. <tr parent="icon" class="hidden">
  386. <td class="indent">icon.code</td>
  387. <td>String</td>
  388. <td><code>undefined</code></td>
  389. <td>This is the code of the icon, for example <code>'\uf007'</code>.</td>
  390. </tr>
  391. <tr parent="icon" class="hidden">
  392. <td class="indent">icon.size</td>
  393. <td>Number</td>
  394. <td><code>50</code></td>
  395. <td>The size of the icon.</td>
  396. </tr>
  397. <tr parent="icon" class="hidden">
  398. <td class="indent">icon.color</td>
  399. <td>String</td>
  400. <td><code>'#2B7CE9'</code></td>
  401. <td>The color of the icon.</td>
  402. </tr>
  403. <tr>
  404. <td>id</td>
  405. <td>String</td>
  406. <td><code>undefined</code></td>
  407. <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>
  408. </tr>
  409. <tr>
  410. <td>image</td>
  411. <td>String</td>
  412. <td><code>undefined</code></td>
  413. <td>When the shape is set to <code>image</code> or <code>circularImage</code>, this option should be the URL
  414. to an image. If the image cannot be found, the brokenImage option can be used.
  415. </td>
  416. </tr>
  417. <tr>
  418. <td>label</td>
  419. <td>String</td>
  420. <td><code>undefined</code></td>
  421. <td>The label is the piece of text shown in or under the node, depending on the shape.</td>
  422. </tr>
  423. <tr>
  424. <td>labelHighlightBold</td>
  425. <td>Boolean</td>
  426. <td><code>true</code></td>
  427. <td>Determines whether or not the label becomes bold when the node is selected.</td>
  428. </tr>
  429. <tr>
  430. <td>level</td>
  431. <td>Number</td>
  432. <td><code>undefined</code></td>
  433. <td>When using the hierarchical layout, the level determines where the node is going to be positioned.</td>
  434. </tr>
  435. <tr>
  436. <td>mass</td>
  437. <td>Number</td>
  438. <td><code>1</code></td>
  439. <td>The barnesHut physics model (which is enabled by default) is based on an inverted gravity model. By
  440. increasing the mass of a node, you increase it's repulsion. Values lower than 1 are not recommended.
  441. </td>
  442. </tr>
  443. <tr>
  444. <td>physics</td>
  445. <td>Boolean</td>
  446. <td><code>true</code></td>
  447. <td>When false, the node is not part of the physics simulation. It will not move except for from manual
  448. dragging.
  449. </td>
  450. </tr>
  451. <tr class='toggle collapsible' onclick="toggleTable('optionTable','scaling', this);">
  452. <td><span parent="scaling" class="right-caret"></span> scaling</td>
  453. <td>Object</td>
  454. <td><code>Object</code></td>
  455. <td>If the <code>value</code> option is specified, the size of the nodes will be scaled according to the
  456. properties in this object. All node shapes can be scaled, but some only when label scaling is enabled as
  457. their size is based on the size of the label.
  458. Only scalable when label scaling is enabled are:
  459. <code>ellipse</code>, <code>circle</code>, <code>database</code>, <code>box</code>, <code>text</code>.
  460. Always scalable are:
  461. <code>image</code>, <code>circularImage</code>, <code>diamond</code>, <code>dot</code>,
  462. <code>star</code>, <code>triangle</code>, <code>triangleDown</code>, <code>square</code> and
  463. <code>icon</code>. Keep in mind that when using scaling, the <code>size</code> option is neglected.
  464. </td>
  465. </tr>
  466. <tr parent="scaling" class="hidden">
  467. <td class="indent">scaling.min</td>
  468. <td>Number</td>
  469. <td><code>10</code></td>
  470. <td>If nodes have a value, their sizes are determined by the value, the scaling function and the min max
  471. values. The min value is the minimum allowed value.
  472. </td>
  473. </tr>
  474. <tr parent="scaling" class="hidden">
  475. <td class="indent">scaling.max</td>
  476. <td>Number</td>
  477. <td><code>30</code></td>
  478. <td>This is the maximum allowed size when the nodes are scaled using the value option.</td>
  479. </tr>
  480. <tr parent="scaling" class="hidden">
  481. <td class="indent">scaling.label</td>
  482. <td>Object or Boolean</td>
  483. <td><code>Object</code></td>
  484. <td>This can be false if the label is not allowed to scale with the node. If true it will scale using
  485. default settigns. For further customization, you can supply an object.
  486. </td>
  487. </tr>
  488. <tr parent="scaling" class="hidden">
  489. <td class="indent2">scaling.label.enabled</td>
  490. <td>Boolean</td>
  491. <td><code>false</code></td>
  492. <td>Toggle the scaling of the label on or off. If this option is not defined, it is set to true if any of
  493. the properties in this object are defined.
  494. </td>
  495. </tr>
  496. <tr parent="scaling" class="hidden">
  497. <td class="indent2">scaling.label.min</td>
  498. <td>Number</td>
  499. <td><code>14</code></td>
  500. <td>The minimum font-size used for labels when scaling.</td>
  501. </tr>
  502. <tr parent="scaling" class="hidden">
  503. <td class="indent2">scaling.label.max</td>
  504. <td>Number</td>
  505. <td><code>30</code></td>
  506. <td>The maximum font-size used for labels when scaling.</td>
  507. </tr>
  508. <tr parent="scaling" class="hidden">
  509. <td class="indent2">scaling.label.maxVisible</td>
  510. <td>Number</td>
  511. <td><code>30</code></td>
  512. <td>When zooming in, the font is drawn larger as well. You can limit the perceived font size using this
  513. option. If set to 30, the font will never look larger than size 30 zoomed at 100%.
  514. </td>
  515. </tr>
  516. <tr parent="scaling" class="hidden">
  517. <td class="indent2">scaling.label.drawThreshold</td>
  518. <td>Number</td>
  519. <td><code>5</code></td>
  520. <td>When zooming out, the font will be drawn smaller. This defines a lower limit for when the font is drawn.
  521. When using font scaling, you can use this together with the maxVisible to first show labels of important
  522. nodes when zoomed out and only show the rest when zooming in.
  523. </td>
  524. </tr>
  525. <tr parent="scaling" class="hidden">
  526. <td class="indent">scaling.customScalingFunction</td>
  527. <td>Function</td>
  528. <td>in description</td>
  529. <td>If nodes have <code>value</code> fields, this function determines how the size of the nodes are scaled
  530. based on their values. The default function is:
  531. <pre>
  532. function (min,max,total,value) {
  533. if (max === min) {
  534. return 0.5;
  535. }
  536. else {
  537. var scale = 1 / (max - min);
  538. return Math.max(0,(value - min)*scale);
  539. }
  540. }
  541. </pre>
  542. The function receives the minimum value of the set, the maximum value, the total sum of all values and
  543. finally the value of the node or edge it works on. <b>It has to return a value between 0 and 1.</b> The
  544. nodes and edges then calculate their size as follows:
  545. <pre>
  546. var scale = customScalingFunction(min,max,total,value);
  547. var diff = maxSize - minSize;
  548. mySize = minSize + diff * scale;
  549. </pre>
  550. Please note: <code>maxSize</code> and <code>minSize</code> are the values <code>scaling.max</code>
  551. and <code>scaling.min</code> provided in the options.
  552. </td>
  553. </tr>
  554. <tr class='toggle collapsible' onclick="toggleTable('optionTable','shadow', this);">
  555. <td><span parent="shadow" class="right-caret"></span> shadow</td>
  556. <td>Object or Boolean</td>
  557. <td><code>Object</code></td>
  558. <td>When true, the node casts a shadow using the default settings. This can be further refined by supplying
  559. an object.
  560. </td>
  561. </tr>
  562. <tr parent="shadow" class="hidden">
  563. <td class="indent">shadow.enabled</td>
  564. <td>Boolean</td>
  565. <td><code>false</code></td>
  566. <td>Toggle the casting of shadows. If this option is not defined, it is set to true if any of the properties
  567. in this object are defined.
  568. </td>
  569. </tr>
  570. <tr parent="shadow" class="hidden">
  571. <td class="indent">shadow.size</td>
  572. <td>Number</td>
  573. <td><code>10</code></td>
  574. <td>The blur size of the shadow.</td>
  575. </tr>
  576. <tr parent="shadow" class="hidden">
  577. <td class="indent">shadow.x</td>
  578. <td>Number</td>
  579. <td><code>5</code></td>
  580. <td>The x offset.</td>
  581. </tr>
  582. <tr parent="shadow" class="hidden">
  583. <td class="indent">shadow.y</td>
  584. <td>Number</td>
  585. <td><code>5</code></td>
  586. <td>The y offset.</td>
  587. </tr>
  588. <tr>
  589. <td>shape</td>
  590. <td>String</td>
  591. <td><code>'ellipse'</code></td>
  592. <td>The shape defines what the node looks like. There are two types of nodes. One type has the label inside
  593. of it and the other type has the label underneath it. The types with the label inside of it are:
  594. <code>ellipse</code>, <code>circle</code>, <code>database</code>, <code>box</code>, <code>text</code>.
  595. The ones with the label outside of it are: <code>image</code>, <code>circularImage</code>,
  596. <code>diamond</code>, <code>dot</code>, <code>star</code>, <code>triangle</code>,
  597. <code>triangleDown</code>, <code>square</code> and <code>icon</code>.
  598. </td>
  599. </tr>
  600. <tr class='toggle collapsible' onclick="toggleTable('optionTable','shapeProperties', this);">
  601. <td><span parent="shapeProperties" class="right-caret"></span> shapeProperties</td>
  602. <td>Object</td>
  603. <td><code>Object</code></td>
  604. <td>This object contains configuration for specific shapes
  605. </td>
  606. </tr>
  607. <tr parent="shapeProperties" class="hidden">
  608. <td class="indent">shapeProperties.borderDashes</td>
  609. <td>Array or Boolean</td>
  610. <td><code>false</code></td>
  611. <td>This property applies to all shapes that have borders.
  612. You set the dashes by supplying an Array. Array formart: [dash length, gap length].
  613. You can also use a Boolean, false is disable and true is default [5,15].
  614. </td>
  615. </tr>
  616. <tr parent="shapeProperties" class="hidden">
  617. <td class="indent">shapeProperties.borderRadius</td>
  618. <td>Number</td>
  619. <td><code>6</code></td>
  620. <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.
  621. </td>
  622. </tr>
  623. <tr parent="shapeProperties" class="hidden">
  624. <td class="indent">shapeProperties.useImageSize</td>
  625. <td>Boolean</td>
  626. <td><code>false</code></td>
  627. <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>:
  628. if this is set to true, the image cannot be scaled with the value option!</i>
  629. </td>
  630. </tr>
  631. <tr>
  632. <td>size</td>
  633. <td>Number</td>
  634. <td><code>25</code></td>
  635. <td>The size is used to determine the size of node shapes that do not have the label inside of them. These
  636. shapes are: <code>image</code>, <code>circularImage</code>, <code>diamond</code>, <code>dot</code>,
  637. <code>star</code>, <code>triangle</code>, <code>triangleDown</code>, <code>square</code> and
  638. <code>icon</code></td>
  639. </tr>
  640. <tr>
  641. <td>title</td>
  642. <td>String or Element</td>
  643. <td><code>undefined</code></td>
  644. <td>Title to be displayed when the user hovers over the node. The title can be an HTML element or a string
  645. containing plain text or HTML.
  646. </td>
  647. </tr>
  648. <tr>
  649. <td>value</td>
  650. <td>Number</td>
  651. <td><code>undefined</code></td>
  652. <td>When a value is set, the nodes will be scaled using the options in the scaling object defined above.
  653. </td>
  654. </tr>
  655. <tr>
  656. <td>x</td>
  657. <td>Number</td>
  658. <td><code>undefined</code></td>
  659. <td>This gives a node an initial x position. When using the hierarchical layout, either the x or y position
  660. is set by the layout engine depending on the type of view. The other value remains untouched. When using
  661. stabilization, the stabilized position may be different from the initial one. To lock the node to that
  662. position use the physics or fixed options.
  663. </td>
  664. </tr>
  665. <tr>
  666. <td>y</td>
  667. <td>Number</td>
  668. <td><code>undefined</code></td>
  669. <td>This gives a node an initial y position. When using the hierarchical layout, either the x or y position
  670. is set by the layout engine depending on the type of view. The other value remains untouched. When using
  671. stabilization, the stabilized position may be different from the initial one. To lock the node to that
  672. position use the physics or fixed options.
  673. </td>
  674. </tr>
  675. </table>
  676. </div>
  677. <!-- Bootstrap core JavaScript
  678. ================================================== -->
  679. <!-- Placed at the end of the document so the pages load faster -->
  680. <script src="../js/jquery.min.js"></script>
  681. <script src="../js/bootstrap.min.js"></script>
  682. <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
  683. <script src="../js/ie10-viewport-bug-workaround.js"></script>
  684. <!-- jquery extensions -->
  685. <script src="../js/jquery.highlight.js"></script>
  686. <script src="../js/jquery.url.min.js"></script>
  687. <!-- Tipue vendor js -->
  688. <script src="../js/tipuesearch.config.js"></script>
  689. <script src="../js/tipuesearch.js"></script>
  690. <!-- controller -->
  691. <script src="../js/main.js"></script>