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