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.

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