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.

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