Create org chart with two root managers

Note

For the versions earlier than 4.x.x (including on-premises ones), please follow this instruction. For the versions earlier than 4.3, follow our update instructions.

You may use the following trick if you need to build a chart with two or more root nodes, for example, if you have multiple CEOs at the top of the hierarchy.

Two root nodes

To do that you need to add a fake manager at the top of your chart and then hide it using custom JavaScript:

Fake manager on the top

Add the following script to the Custom JavaScript tab to hide the fake manager:

api.onBoxRendered((box, itemData) => {
  if (itemData["Title"].contains("Manuel Porras")) { // Replace with your own values
    $box = $(box.elem);
    $box.hide();

    $node = $box.closest(".poch-node");
    let attempts = 0;
    let intervalID = setInterval(() => {
        const $lines = $node.find(".poch-node__lines");

        if ($lines.length > 0 || attempts == 30) {
            $lines.hide();
            clearInterval(intervalID);
        } else {
          attempts++;
        }
    }, 200);
  }
});
Hide fake manager

That is it. Now you have a chart with multiple managers at the top:

Two root nodes

Conclusion

Now you know how to use Plumsail Org Chart to create org chart with two root managers. If you didn’t install it yet, download it and follow the installation instruction for your version of SharePoint in the documentation. It is quite easy to get started.