Multiple Templates in one chart
You can specify two or more templates in a single OrgChart JS instance. Here is how to use a different template for Management department nodes.
- Add a
Managementtag to the node data. Atagis used to group nodes into sets. All nodes with the sametagbelong to the same set. See more in the Tags doc page.
js
{ id: "2", tags: ["Management"] }- Define the template for the
Managementtag.
js
tags: {
"Management": {
template: "rony"
}
},Now all nodes with the Management tag will use the rony template for nodes, links, add/remove buttons, expand/collapse buttons, and ripple.