---
code: "NET-08"
id: "c-dendro"
tab: "network"
kind: "core"
title: "Dendrogram · 직교 트리"
library: "ECharts"
deps: ["echarts@5"]
load: "low"
pasteKind: "echarts-mount"
family: "hierarchy"
dataShape: "nested parent-child structure"
tasks: ["show connections", "show hierarchy", "trace flow"]
tags: ["network", "relationship", "flow", "hierarchy", "tree", "dendrogram", "직교", "트리"]
gallery: "https://graph.heal7.com/#NET-08"
js: "/sku/NET-08.js"
---

# [NET-08] Dendrogram · 직교 트리

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

## 언제 가져가나
위→아래 직교 분기 — 계층 클러스터링 결과 표현에 표준.

**응용** 사용자 군집화, 분류 체계, 종 분류.

## 데이터 모양
- family: `hierarchy`
- dataShape: nested parent-child structure
- tasks: show connections, show hierarchy, trace flow
- tags: network, relationship, flow, hierarchy, tree, dendrogram, 직교, 트리


## 의존
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(){
  reg('c-dendro', {
    backgroundColor:T.bg, tooltip:{trigger:'item'},
    series:[{type:'tree',
      data:[{name:'전체', children:[
        {name:'창의', children:[{name:'UX'},{name:'카피'},{name:'디자인'}]},
        {name:'분석', children:[{name:'데이터'},{name:'리서치'}]},
        {name:'관계', children:[{name:'PM'},{name:'영업'}]}
      ]}],
      layout:'orthogonal', orient:'TB', edgeShape:'polyline', symbol:'circle', symbolSize:8,
      initialTreeDepth:3, top:18, bottom:24, left:14, right:14,
      label:{color:T.fg, fontSize:10, position:'top', verticalAlign:'middle', distance:6},
      leaves:{label:{position:'bottom'}},
      lineStyle:{color:'rgba(232,192,105,.6)', width:1.4},
      itemStyle:{color:T.gold, borderColor:'#fff', borderWidth:1}
    }]
  });
};
factory();
```

## 원본 factory (갤러리 정본 발췌)
- file: `frontend/js/graph-gallery/main.js`
- lines: 2490-2507
- gallery: https://graph.heal7.com/#NET-08
- raw js: https://graph.heal7.com/sku/NET-08.js

```js
function(){
  reg('c-dendro', {
    backgroundColor:T.bg, tooltip:{trigger:'item'},
    series:[{type:'tree',
      data:[{name:'전체', children:[
        {name:'창의', children:[{name:'UX'},{name:'카피'},{name:'디자인'}]},
        {name:'분석', children:[{name:'데이터'},{name:'리서치'}]},
        {name:'관계', children:[{name:'PM'},{name:'영업'}]}
      ]}],
      layout:'orthogonal', orient:'TB', edgeShape:'polyline', symbol:'circle', symbolSize:8,
      initialTreeDepth:3, top:18, bottom:24, left:14, right:14,
      label:{color:T.fg, fontSize:10, position:'top', verticalAlign:'middle', distance:6},
      leaves:{label:{position:'bottom'}},
      lineStyle:{color:'rgba(232,192,105,.6)', width:1.4},
      itemStyle:{color:T.gold, borderColor:'#fff', borderWidth:1}
    }]
  });
}
```

