> For the complete documentation index, see [llms.txt](https://docs.codatum.jp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.codatum.jp/data-exploration/chart/hierarchy-chart.md).

# 階層チャート

## 描画タイプ

階層チャートでは、以下の描画タイプが選択できます。

| <p>ツリー </p><p><picture><source srcset="/files/xl1ACE4sVRkEtPJIWtms" media="(prefers-color-scheme: dark)"><img src="/files/E3linHIMapFBQFeTVDCw" alt="Hierarchy Tree"></picture></p>         | <p>ツリーマップ </p><p><picture><source srcset="/files/BT5iYWwOeLSXFfcc22cy" media="(prefers-color-scheme: dark)"><img src="/files/75UAnEB9eAtwQJMwvuB9" alt="Hierarchy Treemap"></picture></p> | <p>サンバースト </p><p><picture><source srcset="/files/Q1gbbH3Snlv9iLq9xoeI" media="(prefers-color-scheme: dark)"><img src="/files/zxRg3zqyREYE3wEfHpFN" alt="Hierarchy Sunburst"></picture></p> |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p>棒グラフ（ドリルダウン） </p><p><picture><source srcset="/files/w5m0pIovNs6zimboL1uL" media="(prefers-color-scheme: dark)"><img src="/files/AB67G3dH0pfkzfZgr4S8" alt="Hierarchy Bar"></picture></p> |                                                                                                                                                                                           |                                                                                                                                                                                            |

## 仕様

### 集計の仕様

階層チャートでは、[階層（ディメンション）ごとに値（メトリクス）を集計](/data-exploration/chart/chart-common.md#dimension-metric)して階層構造を描画します。

| 項目 | 役割      | 補足                               |
| -- | ------- | -------------------------------- |
| 階層 | ディメンション | 上位から下位へ順番に指定（例：地域 → 都道府県 → 市区町村） |
| 値  | メトリクス   | 指定した場合は重みとして使われる                 |

#### 使用例

* 「地域 → 都道府県 → 市区町村の売上構成」をサンバーストで表示
  * 階層（ディメンション）: 地域、都道府県、市区町村
  * 値（メトリクス）: 売上の合計値
* 「組織階層ごとの件数」をツリーで表示
  * 階層（ディメンション）: 事業部、課、チーム
  * 値（メトリクス）: なし（行数で集計）

### 描画タイプごとの仕様

* ツリー／ツリーマップ／サンバーストは階層構造をそのまま描画します
* 棒グラフ（ドリルダウン）は最上位階層から表示し、要素のクリックで次階層へ遷移します
  * 2階層以上を指定し、描画タイプを「棒グラフ（ドリルダウン）」に設定します

## Tips

### フレーム機能

階層チャート（ツリー、ツリーマップ、サンバースト）はフレーム機能に対応しています。詳細は[フレーム機能](/data-exploration/chart/chart-common.md#frame-feature)を参照ください。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.codatum.jp/data-exploration/chart/hierarchy-chart.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
