# Graph Chart

## Render Types

Graph charts support the following render types.

| <p>Graph </p><p><picture><source srcset="https://1875572357-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzP7hFWzU2Jj7xMbv2nyp%2Fuploads%2Fgit-blob-ca7905485800f9502a712e91950f158dfdb6b39c%2Fgraph-graph-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://1875572357-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzP7hFWzU2Jj7xMbv2nyp%2Fuploads%2Fgit-blob-3eb7186305ea21904dac1897e581c2c21bd6b255%2Fgraph-graph-light.png?alt=media" alt="Graph Chart"></picture></p> | <p>Sankey </p><p><picture><source srcset="https://1875572357-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzP7hFWzU2Jj7xMbv2nyp%2Fuploads%2Fgit-blob-843e912aaf893977dc7fb832164c9ca151e8b7c2%2Fgraph-sankey-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://1875572357-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzP7hFWzU2Jj7xMbv2nyp%2Fuploads%2Fgit-blob-d2cab1a7f804f8564a6f21462b65c7178552b79e%2Fgraph-sankey-light.png?alt=media" alt="Sankey Diagram"></picture></p> |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

## Specifications

### Aggregation

Graph charts [aggregate weights (metrics) for each source and target (dimensions)](https://docs.codatum.com/data-exploration/chart-common#dimension-metric) to visualize relationships between nodes.

| Item   | Role      | Notes                                     |
| ------ | --------- | ----------------------------------------- |
| Source | Dimension | Source node                               |
| Target | Dimension | Target node                               |
| Weight | Metric    | Reflected in edge thickness and node size |

#### Example Configurations

* Show "Page transition counts" as a Sankey diagram
  * Source (Dimension): From page
  * Target (Dimension): To page
  * Weight (Metric): Sum of transition counts
* Show "Mention relationships between users on social media" as a graph
  * Source (Dimension): Mentioning user
  * Target (Dimension): Mentioned user
  * Weight (Metric): Sum of mention counts

### Render Type Specifications

#### Graph

Draws a graph where sources and targets are nodes, connected by edges weighted by metric values.

* Directed/Undirected switching
  * In undirected mode, A→B and B→A are merged
* Frame feature
  * Split the chart by specified column values and switch using a slider. Useful for visualizing time-series changes or category-based comparisons.
* Heatmap display
  * Change colors based on node weight to visually represent importance.

#### Sankey

Draws a Sankey diagram where sources and targets are nodes, connected by edges weighted by metric values. Flow direction is visually clear.

## Tips

### Frame Feature

Graph charts support the frame feature. See [Frame Feature](https://docs.codatum.com/data-exploration/chart-common#frame-feature) for details.
