<trparent="barnesHut"class="hidden"><tdclass="indent">barnesHut.springLength</td><tdclass="mid">Number</td><tdclass="mid"><code>95</code></td><td>The edges are modelled as springs. This springLength here is the the rest length of the spring.</td></tr>
<trparent="barnesHut"class="hidden"><tdclass="indent">barnesHut.springLength</td><tdclass="mid">Number</td><tdclass="mid"><code>95</code></td><td>The edges are modelled as springs. This springLength here is the the rest length of the spring.</td></tr>
<trparent="barnesHut"class="hidden"><tdclass="indent">barnesHut.springConstant</td><tdclass="mid">Number</td><tdclass="mid"><code>0.04</code></td><td>This is how 'sturdy' the springs are. Higher values mean stronger springs.</td></tr>
<trparent="barnesHut"class="hidden"><tdclass="indent">barnesHut.springConstant</td><tdclass="mid">Number</td><tdclass="mid"><code>0.04</code></td><td>This is how 'sturdy' the springs are. Higher values mean stronger springs.</td></tr>
<trparent="barnesHut"class="hidden"><tdclass="indent">barnesHut.damping</td><tdclass="mid">Number</td><tdclass="mid"><code>0.09</code></td><td>Accepted range: <code>[0 .. 1]</code>. The damping factor is how much of the velocity from the previous physics simulation iteration carries over to the next iteration.</td></tr>
<trparent="barnesHut"class="hidden"><tdclass="indent">barnesHut.damping</td><tdclass="mid">Number</td><tdclass="mid"><code>0.09</code></td><td>Accepted range: <code>[0 .. 1]</code>. The damping factor is how much of the velocity from the previous physics simulation iteration carries over to the next iteration.</td></tr>
<trparent="barnesHut"class="hidden"><tdclass="indent">barnesHut.avoidOverlap</td><tdclass="mid">Number</td><tdclass="mid"><code>0</code></td><td>Accepted range: <code>[0 .. 1]</code>. When larger than 0, the size of the node is taken into account. The distance will be calculated from the radius of the encompassing circle of the node for both the gravity model and the spring model. Value 1 is maximum overlap avoidance.</td></tr>
<trclass='toggle collapsible'onclick="toggleTable('optionTable','forceAtlas2Based', this);"><td><spanparent="forceAtlas2Based"class="right-caret"></span> forceAtlas2Based</td><tdclass="mid">Object</td><tdclass="mid"><code>Object</code></td><td>Force Atlas 2 has been developed by <ahref="http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0098679"target="_blank">Jacomi <i>et al</i> (2014)</a> for use with Gephi. The forceAtlas2Based solver makes use of some of the equations provided
<trclass='toggle collapsible'onclick="toggleTable('optionTable','forceAtlas2Based', this);"><td><spanparent="forceAtlas2Based"class="right-caret"></span> forceAtlas2Based</td><tdclass="mid">Object</td><tdclass="mid"><code>Object</code></td><td>Force Atlas 2 has been developed by <ahref="http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0098679"target="_blank">Jacomi <i>et al</i> (2014)</a> for use with Gephi. The forceAtlas2Based solver makes use of some of the equations provided
by them and makes use of the barnesHut implementation in vis. The main differences are the central gravity model,
by them and makes use of the barnesHut implementation in vis. The main differences are the central gravity model,
@ -159,6 +163,7 @@ network.setOptions(options);
<trparent="forceAtlas2Based"class="hidden"><tdclass="indent">forceAtlas2Based.springLength</td><tdclass="mid">Number</td><tdclass="mid"><code>100</code></td><td>The edges are modelled as springs. This springLength here is the the rest length of the spring.</td></tr>
<trparent="forceAtlas2Based"class="hidden"><tdclass="indent">forceAtlas2Based.springLength</td><tdclass="mid">Number</td><tdclass="mid"><code>100</code></td><td>The edges are modelled as springs. This springLength here is the the rest length of the spring.</td></tr>
<trparent="forceAtlas2Based"class="hidden"><tdclass="indent">forceAtlas2Based.springConstant</td><tdclass="mid">Number</td><tdclass="mid"><code>0.08</code></td><td>This is how 'sturdy' the springs are. Higher values mean stronger springs.</td></tr>
<trparent="forceAtlas2Based"class="hidden"><tdclass="indent">forceAtlas2Based.springConstant</td><tdclass="mid">Number</td><tdclass="mid"><code>0.08</code></td><td>This is how 'sturdy' the springs are. Higher values mean stronger springs.</td></tr>
<trparent="forceAtlas2Based"class="hidden"><tdclass="indent">forceAtlas2Based.damping</td><tdclass="mid">Number</td><tdclass="mid"><code>0.4</code></td><td>Accepted range: <code>[0 .. 1]</code>. The damping factor is how much of the velocity from the previous physics simulation iteration carries over to the next iteration.</td></tr>
<trparent="forceAtlas2Based"class="hidden"><tdclass="indent">forceAtlas2Based.damping</td><tdclass="mid">Number</td><tdclass="mid"><code>0.4</code></td><td>Accepted range: <code>[0 .. 1]</code>. The damping factor is how much of the velocity from the previous physics simulation iteration carries over to the next iteration.</td></tr>
<trparent="forceAtlas2Based"class="hidden"><tdclass="indent">forceAtlas2Based.avoidOverlap</td><tdclass="mid">Number</td><tdclass="mid"><code>0</code></td><td>Accepted range: <code>[0 .. 1]</code>. When larger than 0, the size of the node is taken into account. The distance will be calculated from the radius of the encompassing circle of the node for both the gravity model and the spring model. Value 1 is maximum overlap avoidance.</td></tr>
<trclass='toggle collapsible'onclick="toggleTable('optionTable','repulsion', this);"><td><spanparent="repulsion"class="right-caret"></span> repulsion</td><tdclass="mid">Object</td><tdclass="mid"><code>Object</code></td><td>The repulsion model assumes nodes have a simplified repulsion field around them. It's force linearly decreases from 1 (at 0.5*nodeDistance and smaller) to 0 (at 2*nodeDistance).</td></tr>
<trclass='toggle collapsible'onclick="toggleTable('optionTable','repulsion', this);"><td><spanparent="repulsion"class="right-caret"></span> repulsion</td><tdclass="mid">Object</td><tdclass="mid"><code>Object</code></td><td>The repulsion model assumes nodes have a simplified repulsion field around them. It's force linearly decreases from 1 (at 0.5*nodeDistance and smaller) to 0 (at 2*nodeDistance).</td></tr>
<trparent="repulsion"class="hidden"><tdclass="indent">repulsion.nodeDistance</td><tdclass="mid">Number</td><tdclass="mid"><code>100</code></td><td>This is the range of influence for the repulsion.</td></tr>
<trparent="repulsion"class="hidden"><tdclass="indent">repulsion.nodeDistance</td><tdclass="mid">Number</td><tdclass="mid"><code>100</code></td><td>This is the range of influence for the repulsion.</td></tr>
@ -166,6 +171,7 @@ network.setOptions(options);
<trparent="repulsion"class="hidden"><tdclass="indent">repulsion.springLength</td><tdclass="mid">Number</td><tdclass="mid"><code>200</code></td><td>The edges are modelled as springs. This springLength here is the the rest length of the spring.</td></tr>
<trparent="repulsion"class="hidden"><tdclass="indent">repulsion.springLength</td><tdclass="mid">Number</td><tdclass="mid"><code>200</code></td><td>The edges are modelled as springs. This springLength here is the the rest length of the spring.</td></tr>
<trparent="repulsion"class="hidden"><tdclass="indent">repulsion.springConstant</td><tdclass="mid">Number</td><tdclass="mid"><code>0.05</code></td><td>This is how 'sturdy' the springs are. Higher values mean stronger springs.</td></tr>
<trparent="repulsion"class="hidden"><tdclass="indent">repulsion.springConstant</td><tdclass="mid">Number</td><tdclass="mid"><code>0.05</code></td><td>This is how 'sturdy' the springs are. Higher values mean stronger springs.</td></tr>
<trparent="repulsion"class="hidden"><tdclass="indent">repulsion.damping</td><tdclass="mid">Number</td><tdclass="mid"><code>0.09</code></td><td>Accepted range: <code>[0 .. 1]</code>. The damping factor is how much of the velocity from the previous physics simulation iteration carries over to the next iteration.</td></tr>
<trparent="repulsion"class="hidden"><tdclass="indent">repulsion.damping</td><tdclass="mid">Number</td><tdclass="mid"><code>0.09</code></td><td>Accepted range: <code>[0 .. 1]</code>. The damping factor is how much of the velocity from the previous physics simulation iteration carries over to the next iteration.</td></tr>
<trparent="repulsion"class="hidden"><tdclass="indent">repulsion.avoidOverlap</td><tdclass="mid">Number</td><tdclass="mid"><code>0</code></td><td>Accepted range: <code>[0 .. 1]</code>. When larger than 0, the size of the node is taken into account. The distance will be calculated from the radius of the encompassing circle of the node for the spring model. Value 1 is maximum overlap avoidance.</td></tr>
<trclass='toggle collapsible'onclick="toggleTable('optionTable','hierarchicalRepulsion', this);"><td><spanparent="hierarchicalRepulsion"class="right-caret"></span> hierarchicalRepulsion</td><tdclass="mid">Object</td><tdclass="mid"><code>Object</code></td><td>This model is based on the repulsion solver but the levels are taken into account and the forces are normalized.</td></tr>
<trclass='toggle collapsible'onclick="toggleTable('optionTable','hierarchicalRepulsion', this);"><td><spanparent="hierarchicalRepulsion"class="right-caret"></span> hierarchicalRepulsion</td><tdclass="mid">Object</td><tdclass="mid"><code>Object</code></td><td>This model is based on the repulsion solver but the levels are taken into account and the forces are normalized.</td></tr>
<trparent="hierarchicalRepulsion"class="hidden"><tdclass="indent">hierarchicalRepulsion.nodeDistance</td><tdclass="mid">Number</td><tdclass="mid"><code>120</code></td><td>This is the range of influence for the repulsion.</td></tr>
<trparent="hierarchicalRepulsion"class="hidden"><tdclass="indent">hierarchicalRepulsion.nodeDistance</td><tdclass="mid">Number</td><tdclass="mid"><code>120</code></td><td>This is the range of influence for the repulsion.</td></tr>
<p>Labels can be aligned to edges in various ways.</p>
<p>Labels of edges can be aligned to edges in various ways. <br>Label alignment for nodes (top, bottom, left, right, inside) is planned but not in vis yet.</p>
<divid="mynetwork"></div>
<divid="mynetwork"></div>
@ -34,10 +37,10 @@
// create an array with edges
// create an array with edges
var edges = [
var edges = [
{from: 1, to: 2, label: 'middle', font: {align:'middle', background:'orange'}},
{from: 1, to: 3, label: 'top', font: {align: 'top', background:'green'}},
this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap));// if 1 then min distance = 0.5, if 0.5 then min distance = 0.5 + 0.5*node.shape.radius
this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap));// if 1 then min distance = 0.5, if 0.5 then min distance = 0.5 + 0.5*node.shape.radius