# 階層チャート

## 描画タイプ

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

| <p>ツリー </p><p><picture><source srcset="https://1959197998-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvyRvOrlY46GCAFYEPPGZ%2Fuploads%2Fgit-blob-749069606e9bdc650e215db7ce885dba9bf3159a%2Fhierarchy-tree-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://1959197998-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvyRvOrlY46GCAFYEPPGZ%2Fuploads%2Fgit-blob-ae8afde3afc3a1adc88a7e0f22cbc1b381254e86%2Fhierarchy-tree-light.png?alt=media" alt="Hierarchy Tree"></picture></p>       | <p>ツリーマップ </p><p><picture><source srcset="https://1959197998-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvyRvOrlY46GCAFYEPPGZ%2Fuploads%2Fgit-blob-af85c0d96d3481966fdb736d715ddb64952d84ba%2Fhierarchy-treemap-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://1959197998-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvyRvOrlY46GCAFYEPPGZ%2Fuploads%2Fgit-blob-41ebcd65e3cbd0e62842bc9dfa4d9db3ea0c5736%2Fhierarchy-treemap-light.png?alt=media" alt="Hierarchy Treemap"></picture></p> | <p>サンバースト </p><p><picture><source srcset="https://1959197998-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvyRvOrlY46GCAFYEPPGZ%2Fuploads%2Fgit-blob-b941016cfb970e34a68f8a82ce7d3172f9873f09%2Fhierarchy-sunburst-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://1959197998-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvyRvOrlY46GCAFYEPPGZ%2Fuploads%2Fgit-blob-7b39d7595523ff10338ec0c28bb7947805ab0772%2Fhierarchy-sunburst-light.png?alt=media" alt="Hierarchy Sunburst"></picture></p> |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p>棒グラフ（ドリルダウン） </p><p><picture><source srcset="https://1959197998-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvyRvOrlY46GCAFYEPPGZ%2Fuploads%2Fgit-blob-0e326564409c7264c878519d2b6ae3de63af1337%2Fhierarchy-bar-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://1959197998-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvyRvOrlY46GCAFYEPPGZ%2Fuploads%2Fgit-blob-2a7a6088bfc5ba8bdb09bb21eadd4bf4675a8986%2Fhierarchy-bar-light.png?alt=media" alt="Hierarchy Bar"></picture></p> |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |

## 仕様

### 集計の仕様

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

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

#### 使用例

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

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

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

## Tips

### フレーム機能

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


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
