Get started with OrgChart.js CDN

MIT licensed

OrgChart.js is a free and open-source library for creating organizational chart diagrams.

Tags:
  • es6
  • ES2015
  • organization chart
  • tree-like

Stable version

Copied!

How to start using OrgChart.js CDN


<!DOCTYPE html>
<html>
<head>
    <title>Get started with OrgChart.js CDN - cdnhub.io</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/orgchart.min.css" />
    <script src="https://cdn.cdnhub.io/OrgChart.js/0.0.1/OrgChart.min.js"></script>
</head>
<body>
    <div id="orgchart"></div>
    <script>
        const data = {
            'CEO': { id: 'CEO', children: [ 'Manager1', 'Manager2' ] },
            'Manager1': { id: 'Manager1', children: [ 'Employee1', 'Employee2' ] },
            'Manager2': { id: 'Manager2', children: [ 'Employee3', 'Employee4' ] },
            'Employee1': { id: 'Employee1' },
            'Employee2': { id: 'Employee2' },
            'Employee3': { id: 'Employee3' },
            'Employee4': { id: 'Employee4' },
        };

        orgchart('orgchart', data);
    </script>
</body>
</html>
Copied!
Copied!
Copied!

All versions