---
code: "TIM-02"
id: "c-polar"
tab: "timeline"
kind: "core"
title: "Polar Rose · 방사형"
library: "ECharts"
deps: ["echarts@5"]
load: "low"
pasteKind: "echarts-mount"
family: "time-series"
dataShape: "time-indexed series, events or schedules"
tasks: ["show trend", "show seasonality", "show sequence"]
tags: ["time-series", "trend", "timeline", "polar", "rose", "방사형"]
gallery: "https://graph.heal7.com/#TIM-02"
js: "/sku/TIM-02.js"
---

# [TIM-02] Polar Rose · 방사형

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

## 언제 가져가나
시간대별(0–24시) 활동 강도 폴라차트.

**응용** 감정 일주기, 트래픽 시간대 분포.

## 데이터 모양
- family: `time-series`
- dataShape: time-indexed series, events or schedules
- tasks: show trend, show seasonality, show sequence
- tags: time-series, trend, timeline, polar, rose, 방사형


## 의존
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 data = [];
  for(let h=0;h<24;h++){
    const v = 30 + 60*Math.exp(-Math.pow((h-14)/4,2)) + 25*Math.exp(-Math.pow((h-3)/2,2));
    data.push(Math.round(v));
  }
  reg('c-polar', {
    backgroundColor:T.bg, polar:{},
    angleAxis:{type:'category', data:Array.from({length:24},(_,i)=>i+'시'), axisLabel:{color:T.sub,fontSize:9}},
    radiusAxis:{axisLabel:{color:T.sub,fontSize:9}, splitLine:{lineStyle:{color:T.grid}}},
    series:[{type:'bar', coordinateSystem:'polar', data, roundCap:true,
      itemStyle:{color:p=>{
        const h = p.dataIndex; if(h<6) return T.royal; if(h<12) return T.gold; if(h<18) return '#e07a5f'; return T.plum;
      }}}]
  });
};
factory();
```

## 원본 factory (갤러리 정본 발췌)
- file: `frontend/js/graph-gallery/main.js`
- lines: 615-630
- gallery: https://graph.heal7.com/#TIM-02
- raw js: https://graph.heal7.com/sku/TIM-02.js

```js
function(){
  const data = [];
  for(let h=0;h<24;h++){
    const v = 30 + 60*Math.exp(-Math.pow((h-14)/4,2)) + 25*Math.exp(-Math.pow((h-3)/2,2));
    data.push(Math.round(v));
  }
  reg('c-polar', {
    backgroundColor:T.bg, polar:{},
    angleAxis:{type:'category', data:Array.from({length:24},(_,i)=>i+'시'), axisLabel:{color:T.sub,fontSize:9}},
    radiusAxis:{axisLabel:{color:T.sub,fontSize:9}, splitLine:{lineStyle:{color:T.grid}}},
    series:[{type:'bar', coordinateSystem:'polar', data, roundCap:true,
      itemStyle:{color:p=>{
        const h = p.dataIndex; if(h<6) return T.royal; if(h<12) return T.gold; if(h<18) return '#e07a5f'; return T.plum;
      }}}]
  });
}
```

