I can’t figure out why a child node sits underneath the top or left most parent, and does not automatically center itself under the middle parent. My json looks like this:
var nodeDataArray = [
{ key: "MARYLAND INDUSTRY", geo: "file"},
{ key: "CHESTFIELD HOLDING", geo: "file"},
{ key: "FARMER HOLDING", geo: "file" },
{ key: "HEETON HOLDING", geo: "file"},
{ key: "FRUIT", geo: "file" },
{ key: "WHEAT", geo: "file" },
{key: "LODGING", geo: "file"},
{ key: "CHILD 1", geo: "file" },
{ key: "CHILD 2", geo: "file" },
{ key: "CHILD 3", geo: "file" },
{ key: "CHILD 4", geo: "file" },
{ key: "CHILD 5", geo: "file" },
];
var linkDataArray = [
{ from: "MARYLAND INDUSTRY", to: "CHESTFIELD HOLDING", status: "complete" },
{ from: "MARYLAND INDUSTRY", to: "FARMER HOLDING", weight: "75%", status: "open" },
{ from: "MARYLAND INDUSTRY", to: "HEETON HOLDING", status: "open" },
{ from: "MARYLAND INDUSTRY", to: "WHEAT", status: "open" },
{ from: "FARMER HOLDING", to: "WHEAT", weight: "25%", status: "open" },
{ from: "FARMER HOLDING", to: "FRUIT", weight: "25%", status: "open" },
{ from: "FARMER HOLDING", to: "LODGING", weight: "25%", status: "open" },
{from: "CHESTFIELD HOLDING", to: "WHEAT", weight: "46%", status: "complete"},
{from: "CHESTFIELD HOLDING", to: "FRUIT", weight: "46%", status: "open"},
{from: "CHESTFIELD HOLDING", to: "LODGING", weight: "46%", status: "open"},
{from: "HEETON HOLDING", to: "WHEAT", weight: "45%", status: "open"},
{from: "HEETON HOLDING", to: "FRUIT", weight: "20%", status: "complete"},
{from: "HEETON HOLDING", to: "LODGING", weight: "46%", status: "open"},
{from: "FRUIT", to: "CHILD 1"},
{from: "FRUIT", to: "CHILD 2"},
{from: "FRUIT", to: "CHILD 3"},
{from: "FRUIT", to: "CHILD 4"},
{from: "FRUIT", to: "CHILD 5"}
];
I want the 3rd depth of nodes (WHEAT, FRUIT, LODGING) to sit centered underneath the “FARMER HOLDING” node, not the far left “CHESTFIELD” node.
Thanks for the help.