---
code: "INT-04"
id: "c-tree"
tab: "dynamic-1"
kind: "interactive"
title: "Radial Tree · 방사형 트리"
library: "ECharts"
deps: ["echarts@5"]
load: "low"
pasteKind: "echarts-mount"
family: "hierarchy"
dataShape: "expandable radial tree"
tasks: ["explore data", "monitor change", "drill into structure", "show hierarchy", "show drillable hierarchy"]
tags: ["interactive", "live", "exploration", "hierarchy", "tree", "radial", "방사형", "트리"]
gallery: "https://graph.heal7.com/#INT-04"
js: "/sku/INT-04.js"
---

# [INT-04] Radial Tree · 방사형 트리

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

## 언제 가져가나
중심에서 뻗어나가는 계층 — 노드 클릭으로 접고 펼침.

**응용** 진로 트리, 조직도, 의사결정 분기.

## 데이터 모양
- family: `hierarchy`
- dataShape: expandable radial tree
- tasks: explore data, monitor change, drill into structure, show hierarchy, show drillable hierarchy
- tags: interactive, live, exploration, hierarchy, tree, radial, 방사형, 트리


## 의존
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-tree'); if(!dom) return;
  const c = echarts.init(dom);
  const tree = {name:'나', children:[
    {name:'창의', children:[{name:'UX'},{name:'카피'},{name:'영상'}]},
    {name:'분석', children:[{name:'데이터'},{name:'리서치'}]},
    {name:'관계', children:[{name:'PM'},{name:'CS'}]},
    {name:'실행', children:[{name:'개발'},{name:'운영'}]}
  ]};
  c.setOption({
    backgroundColor:T.bg, tooltip:{trigger:'item'},
    series:[{type:'tree', data:[tree], layout:'radial', symbol:'circle', symbolSize:10,
      initialTreeDepth:2, roam:false,
      lineStyle:{color:'rgba(232,192,105,.4)', width:1.2, curveness:.5},
      itemStyle:{color:T.gold, borderColor:'#fff', borderWidth:1.2},
      label:{color:T.fg, fontSize:11, position:'right', rotate:'radial'},
      leaves:{label:{position:'right', color:T.sub, fontSize:10, rotate:'radial'}},
      emphasis:{focus:'descendant', itemStyle:{color:T.rose}},
      animationDuration:700, animationDurationUpdate:600
    }]
  });
  charts.push(c);
};
factory();
```

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

```js
function(){
  const dom = document.getElementById('c-tree'); if(!dom) return;
  const c = echarts.init(dom);
  const tree = {name:'나', children:[
    {name:'창의', children:[{name:'UX'},{name:'카피'},{name:'영상'}]},
    {name:'분석', children:[{name:'데이터'},{name:'리서치'}]},
    {name:'관계', children:[{name:'PM'},{name:'CS'}]},
    {name:'실행', children:[{name:'개발'},{name:'운영'}]}
  ]};
  c.setOption({
    backgroundColor:T.bg, tooltip:{trigger:'item'},
    series:[{type:'tree', data:[tree], layout:'radial', symbol:'circle', symbolSize:10,
      initialTreeDepth:2, roam:false,
      lineStyle:{color:'rgba(232,192,105,.4)', width:1.2, curveness:.5},
      itemStyle:{color:T.gold, borderColor:'#fff', borderWidth:1.2},
      label:{color:T.fg, fontSize:11, position:'right', rotate:'radial'},
      leaves:{label:{position:'right', color:T.sub, fontSize:10, rotate:'radial'}},
      emphasis:{focus:'descendant', itemStyle:{color:T.rose}},
      animationDuration:700, animationDurationUpdate:600
    }]
  });
  charts.push(c);
}
```

