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.

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