You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 29, 2019. It is now read-only.
Copy file name to clipboardexpand all lines: docs/network/layout.html
+16-1
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,8 @@ <h3>Options</h3>
66
66
edgeMinimization: true,
67
67
parentCentralization: true,
68
68
direction: 'UD', // UD, DU, LR, RL
69
-
sortMethod: 'hubsize' // hubsize, directed
69
+
sortMethod: 'hubsize', // hubsize, directed
70
+
userControlsFreeAxis: false
70
71
}
71
72
}
72
73
}
@@ -103,6 +104,20 @@ <h3>Options</h3>
103
104
<trparent="hierarchical" class="hidden"><tdclass="indent">hierarchical.sortMethod</td><td>String</td><td><code>'hubsize'</code></td><td>The algorithm used to ascertain the levels of the nodes based on the data. The possible options are: <code>hubsize, directed</code>. <br><br>
104
105
Hubsize takes the nodes with the most edges and puts them at the top. From that the rest of the hierarchy is evaluated. <br><br>
105
106
Directed adheres to the to and from data of the edges. A --> B so B is a level lower than A.</td></tr>
<td>Whether or not the value specified by a node's <code>Dataset</code><code>x</code> or <code>y</code> values will affect a node's layout along its "free" axis.<br><br>
112
+
If the hierarchical layout <code>direction</code> is either <code>"DU"</code> or <code>"UD"</code>, vis.js will layout the node using the Node's <code>x</code> property,
113
+
or if <code>direction</code>is either <code>"LR"</code> or <code>"RL"</code>, vis.js will use the node's <code>y</code> property.<br><br>
114
+
If the property vis wants to use (e.g., the <code>x</code> or <code>y</code> property on the node within the target <code>Dataset</code>)
115
+
is undefined, the default behavior is invoked, as though this option were set to <code>false</code>. This provides the ability to initally utilize Vis's default layout,
116
+
then later call <code>Network.storePositions()</code> and have the hierarchical layout engine respect the retreived values.<br><br>
117
+
This option is helpful because updating a hierarchically layed-out graph will trigger a redraw, and without this option, if a node has been moved along its free axis,
118
+
it will be returned to its default position.<br><br>
0 commit comments