OrgChart JS is a simple, flexible and highly customizable organization chart plugin for presenting the structure of your organization and the relationships in an elegant way.
the link above demonstrated how to highlight child node to parent node.
Can you explain the line of the code below:
chart.onInit(() => {
setHighlightStyle(chart.getNode(5), 5);
});
based on the documentation:
getNode(nodeId: string | number): OrgChart.node;
5 is nodeId either string or number in that case it is number.
so why it is 5?
the link above demonstrated how to highlight child node to parent node. Can you explain the line of the code below: chart.onInit(() => { setHighlightStyle(chart.getNode(5), 5); }); based on the documentation: getNode(nodeId: string | number): OrgChart.node;
5 is nodeId either string or number in that case it is number. so why it is 5?