Show / Hide Table of Contents

Multiple Templates in one chart

You can specify two or more templates in one Org Chart JS, here is how you can use different template for Management departament nodes

  1. Add tag Management - A tag is used to group nodes into sets. All nodes tagged with the same tag belongs to the same set.
     
        nodes: [
            { id: "1", tags: ["Management"], ...}
        ]
        
  2. Define the template for Management tag.
     
        tags: {
            "Management": {
                template: "rony"
            }
        },  
        
    Now all nodes with tag Management will use rony template for the nodes, links, add/remove buttons, expand/collapse buttons and ripple.