OrgChart JS Documentation

C links

You can specify two or more curved links in one OrgChart JS

Clink options:
 
        var chart = new OrgChart(document.getElementById('tree'), {
            clinks: [
                {from: 4, to: 0, label: 'text'}, 
                {from: 4, to: 5, template: 'blue', label: '4 reports to 3' },
                {from: 2, to: 6, template: 'yellow', label: 'lorem ipsum' },
            ]   
            ...
        });
    
from is the id of the start node
to is the id of the end node
Define label if you want to add text in the middle of the clink
Add template if you want to add specifics style to the clink
Clink constants:
 
        OrgChart.CLINK_CURVE = 1.5;
        var chart = new OrgChart(document.getElementById('tree'), {
            clinks: [
                {from: 4, to: 0, label: 'text'}
            ]   
            ...
        });
    
Change OrgChart.CLINK_CURVE if you want to change the curve Clink methods:
 
    chart.addClink(from, to, label, template)        
 
    chart.removeClink(from, to)        
Clink templates: