This is a solution for Org Chart 3. Check the reply for Org Chart 4 here.
Hi @SPMan,
Thank you for your question.
It's not possible to find items with no subordinates through the number of subordinates mechanism. This feature loads dynamically, thus it's not possible get the value in the onBoxRendered event.
But you can do it like this:
renderer.onBoxRendered(function(event, box, itemData){
var itemWrap = box.$elem.closest(".poch-item-wrap");
if(!itemWrap.hasClass("poch-with-subordinates"))
{
box.$elem.addClass("custom-class");
}
});
So, now items without subordinates have a custom class. You can hide the link by default and display it for the boxes with the custom class only.
Anna Dorokhova
Plumsail Team