---
code: "INT-05"
id: "c-orgchart"
tab: "dynamic-1"
kind: "interactive"
title: "Organization Chart · 조직도"
library: "ECharts"
deps: ["echarts@5"]
load: "low"
pasteKind: "echarts-mount"
family: "organization"
dataShape: "expandable reporting tree"
tasks: ["explore data", "monitor change", "drill into structure", "show hierarchy", "show reporting lines"]
tags: ["interactive", "live", "exploration", "hierarchy", "tree", "org chart", "organization", "chart", "조직도"]
gallery: "https://graph.heal7.com/#INT-05"
js: "/sku/INT-05.js"
---

# [INT-05] Organization Chart · 조직도

> AI 붙여넣기 카드. 갤러리 런타임(`main.js`)이 아니라 이 파일을 가져와라.

## 언제 가져가나
직책 노드를 접고 펼치며 계층과 보고 라인을 읽는 인터랙티브 조직도.

**응용** 기업 조직 구조, 프로젝트 스쿼드, 병원/학교 부서 체계, 의사결정 라인.

## 데이터 모양
- family: `organization`
- dataShape: expandable reporting tree
- tasks: explore data, monitor change, drill into structure, show hierarchy, show reporting lines
- tags: interactive, live, exploration, hierarchy, tree, org chart, organization, chart, 조직도


## 의존
echarts@5 · load `low` · library `ECharts`

## 붙여넣는 법
1. echarts 5.x 로드 (GL이면 echarts-gl도)
2. 컨테이너 id를 원본 id와 맞추거나 `document.getElementById` 한 줄만 바꾼다
3. `T`, `reg`, `cssv` 가 필요하면 갤러리 테마 스텁을 함께 가져간다

```js
const T = {
  "bg": "transparent",
  "fg": "#ece8f5",
  "sub": "#a59bbd",
  "grid": "rgba(255,255,255,.08)",
  "gold": "#e8c069",
  "royal": "#6b8cff",
  "rose": "#e07a9f",
  "teal": "#6dd2c4",
  "plum": "#b487e8"
};
const cssv = (n, fb) => (getComputedStyle(document.documentElement).getPropertyValue(n).trim() || fb);
const isDark = () => document.documentElement.getAttribute('data-theme') !== 'light';
const charts = [];
const reg = (id, opt) => {
  const dom = document.getElementById(id); if (!dom) return;
  const c = echarts.init(dom, null, {renderer:'canvas'});
  c.setOption(opt);
  charts.push(c);
  return c;
};
const factory = function(){
  const dom = document.getElementById('c-orgchart'); if(!dom) return;
  const c = echarts.init(dom);
  const org = {
    name:'대표',
    title:'Chief Executive',
    symbolSize:[110, 42],
    itemStyle:{color:'rgba(232,192,105,.18)', borderColor:T.gold, borderWidth:2},
    label:{color:T.gold, fontWeight:700},
    children:[
      {
        name:'전략실',
        title:'Strategy & Data',
        symbolSize:[100, 38],
        itemStyle:{color:'rgba(107,140,255,.18)', borderColor:T.royal, borderWidth:1.6},
        children:[
          {name:'PMO', title:'프로그램 운영', symbolSize:[86, 32], itemStyle:{color:'rgba(107,140,255,.12)', borderColor:T.royal}},
          {name:'Data Lab', title:'실험 · 분석', symbolSize:[92, 32], itemStyle:{color:'rgba(107,140,255,.12)', borderColor:T.royal}},
          {name:'AI Ops', title:'자동화 운영', symbolSize:[90, 32], itemStyle:{color:'rgba(107,140,255,.12)', borderColor:T.royal}}
        ]
      },
      {
        name:'성장본부',
        title:'Growth',
        symbolSize:[100, 38],
        itemStyle:{color:'rgba(109,210,196,.18)', borderColor:T.teal, borderWidth:1.6},
        children:[
          {name:'마케팅', title:'캠페인', symbolSize:[86, 32], itemStyle:{color:'rgba(109,210,196,.12)', borderColor:T.teal}},
          {name:'CRM', title:'리텐션', symbolSize:[82, 32], itemStyle:{color:'rgba(109,210,196,.12)', borderColor:T.teal}},
          {name:'세일즈', title:'파이프라인', symbolSize:[86, 32], itemStyle:{color:'rgba(109,210,196,.12)', borderColor:T.teal}}
        ]
      },
      {
        name:'제품본부',
        title:'Product',
        symbolSize:[100, 38],
        itemStyle:{color:'rgba(224,122,159,.18)', borderColor:T.rose, borderWidth:1.6},
        children:[
          {name:'UX', title:'Research', symbolSize:[82, 32], itemStyle:{color:'rgba(224,122,159,.12)', borderColor:T.rose}},
          {name:'Frontend', title:'Web', symbolSize:[92, 32], itemStyle:{color:'rgba(224,122,159,.12)', borderColor:T.rose}},
          {name:'Backend', title:'Platform', symbolSize:[92, 32], itemStyle:{color:'rgba(224,122,159,.12)', borderColor:T.rose}}
        ]
      }
    ]
  };
  c.setOption({
    backgroundColor:T.bg,
    tooltip:{
      trigger:'item',
      formatter: params => {
        const data = params.data || {};
        return `<b>${data.name || ''}</b>${data.title ? `<br>${data.title}` : ''}`;
      }
    },
    series:[{
      type:'tree',
      data:[org],
      top:'8%',
      left:'3%',
      bottom:'8%',
      right:'16%',
      layout:'orthogonal',
      orient:'LR',
      symbol:'roundRect',
      roam:false,
      expandAndCollapse:true,
      initialTreeDepth:2,
      edgeShape:'polyline',
      edgeForkPosition:'28%',
      lineStyle:{color:'rgba(232,192,105,.26)', width:1.4},
      label:{
        position:'inside',
        color:T.fg,
        fontSize:10.5,
        lineHeight:13,
        formatter: params => {
          const data = params.data || {};
          return data.title ? `${data.name}\n${data.title}` : data.name;
        }
      },
      emphasis:{focus:'descendant'},
      animationDuration:600,
      animationDurationUpdate:500
    }]
  });
  charts.push(c);
};
factory();
```

## 원본 factory (갤러리 정본 발췌)
- file: `frontend/js/graph-gallery/main.js`
- lines: 1211-1297
- gallery: https://graph.heal7.com/#INT-05
- raw js: https://graph.heal7.com/sku/INT-05.js

```js
function(){
  const dom = document.getElementById('c-orgchart'); if(!dom) return;
  const c = echarts.init(dom);
  const org = {
    name:'대표',
    title:'Chief Executive',
    symbolSize:[110, 42],
    itemStyle:{color:'rgba(232,192,105,.18)', borderColor:T.gold, borderWidth:2},
    label:{color:T.gold, fontWeight:700},
    children:[
      {
        name:'전략실',
        title:'Strategy & Data',
        symbolSize:[100, 38],
        itemStyle:{color:'rgba(107,140,255,.18)', borderColor:T.royal, borderWidth:1.6},
        children:[
          {name:'PMO', title:'프로그램 운영', symbolSize:[86, 32], itemStyle:{color:'rgba(107,140,255,.12)', borderColor:T.royal}},
          {name:'Data Lab', title:'실험 · 분석', symbolSize:[92, 32], itemStyle:{color:'rgba(107,140,255,.12)', borderColor:T.royal}},
          {name:'AI Ops', title:'자동화 운영', symbolSize:[90, 32], itemStyle:{color:'rgba(107,140,255,.12)', borderColor:T.royal}}
        ]
      },
      {
        name:'성장본부',
        title:'Growth',
        symbolSize:[100, 38],
        itemStyle:{color:'rgba(109,210,196,.18)', borderColor:T.teal, borderWidth:1.6},
        children:[
          {name:'마케팅', title:'캠페인', symbolSize:[86, 32], itemStyle:{color:'rgba(109,210,196,.12)', borderColor:T.teal}},
          {name:'CRM', title:'리텐션', symbolSize:[82, 32], itemStyle:{color:'rgba(109,210,196,.12)', borderColor:T.teal}},
          {name:'세일즈', title:'파이프라인', symbolSize:[86, 32], itemStyle:{color:'rgba(109,210,196,.12)', borderColor:T.teal}}
        ]
      },
      {
        name:'제품본부',
        title:'Product',
        symbolSize:[100, 38],
        itemStyle:{color:'rgba(224,122,159,.18)', borderColor:T.rose, borderWidth:1.6},
        children:[
          {name:'UX', title:'Research', symbolSize:[82, 32], itemStyle:{color:'rgba(224,122,159,.12)', borderColor:T.rose}},
          {name:'Frontend', title:'Web', symbolSize:[92, 32], itemStyle:{color:'rgba(224,122,159,.12)', borderColor:T.rose}},
          {name:'Backend', title:'Platform', symbolSize:[92, 32], itemStyle:{color:'rgba(224,122,159,.12)', borderColor:T.rose}}
        ]
      }
    ]
  };
  c.setOption({
    backgroundColor:T.bg,
    tooltip:{
      trigger:'item',
      formatter: params => {
        const data = params.data || {};
        return `<b>${data.name || ''}</b>${data.title ? `<br>${data.title}` : ''}`;
      }
    },
    series:[{
      type:'tree',
      data:[org],
      top:'8%',
      left:'3%',
      bottom:'8%',
      right:'16%',
      layout:'orthogonal',
      orient:'LR',
      symbol:'roundRect',
      roam:false,
      expandAndCollapse:true,
      initialTreeDepth:2,
      edgeShape:'polyline',
      edgeForkPosition:'28%',
      lineStyle:{color:'rgba(232,192,105,.26)', width:1.4},
      label:{
        position:'inside',
        color:T.fg,
        fontSize:10.5,
        lineHeight:13,
        formatter: params => {
          const data = params.data || {};
          return data.title ? `${data.name}\n${data.title}` : data.name;
        }
      },
      emphasis:{focus:'descendant'},
      animationDuration:600,
      animationDurationUpdate:500
    }]
  });
  charts.push(c);
}
```

