Here we override the LayoutEngine logic if a user has BOTH specified this option and supplied a "free axis" value in any of their nodes within the Dataset they've bound to Network. The "free axis" is x if hierarchical.direction is "DU" / "UD", and y if it's "LR" / "RL". Undefined values for the free axis leave LayoutEngine doing what it did prior to this commit.
In addition I added some documentation for this in './docs/network/layout.html'.
[x] Provide an additional or update an example to demonstrate your changes or new features.
[x] Update the documentation if you introduced new behavior or changed existing behavior.
[x] Expect review comments and change requests by reviewer.
This commit solves a question I asked on stackoverflow: https://stackoverflow.com/questions/53127971/how-can-i-set-node-positions-in-a-hierarchical-layout
Here we override the
LayoutEngine
logic if a user has BOTH specified this option and supplied a "free axis" value in any of their nodes within theDataset
they've bound toNetwork
. The "free axis" isx
ifhierarchical.direction
is"DU"
/"UD"
, andy
if it's"LR"
/"RL"
. Undefined values for the free axis leaveLayoutEngine
doing what it did prior to this commit.In addition I added some documentation for this in './docs/network/layout.html'.