---
url: 'https://docs.codatum.com/features/notebook/chart/concept/overview.md'
description: Overview of how charts are rendered and how data modeling works
---

# Chart concepts

A chart is a feature that specifies how to process and render the SQL run result of a data source. Settings are split between **basic settings** and **advanced settings** on the chart edit screen.

* **Basic settings**: processing the data for rendering, such as dimensions, metrics, and the source filter.
* **Advanced settings**: adjusting the appearance, such as axes, legend, value format, and frame display.

## Rendering flow {#pipeline}

Charts are rendered in the following flow.

```mermaid
flowchart LR
  source[SQL run result of the data source]
  settings[Data modeling from basic settings]
  decide{Meets the conditions for in-memory processing?}
  inmem[Process in the browser]
  sqlProc[Run processing SQL]
  draw[Render based on advanced settings (up to 1000 rows)]
  source --> settings --> decide
  decide -->|Yes| inmem --> draw
  decide -->|No| sqlProc --> draw
```

1. Fetches the run result of the SQL specified as the data source.
2. Prepares data for rendering based on the dimensions, metrics, source filter, and other **basic settings**.
3. If all of the following conditions are met, performs equivalent processing in the browser without issuing new SQL (in-memory processing):
   * The data source's run result has 1000 rows or fewer.
   * **Custom SQL** isn't specified.
   * **Disable in-memory processing** is off.
4. Renders the chart based on the processed result (up to 1000 rows) and **advanced settings**.

If the data to render exceeds 1000 rows, the screen shows "Rendered with up to 1000 rows of data." See [Filter, sort, and limit](./filter-sort-limit#limit) for the row limit.

## Data modeling {#data-modeling}

A chart structures and processes the SQL run result using the following components.

| Component {.nowrap} | SQL equivalent | Role |
| --- | --- | --- |
| [Dimension](./dimension-metrics#dimension-metric) | `GROUP BY` clause | The axis used to split data. |
| [Metric](./dimension-metrics#dimension-metric) | Aggregate functions such as `SUM()` | The numeric value being aggregated. |
| [Source filter](./filter-sort-limit#source-filter) | `WHERE` clause | Narrows down the data to aggregate. |

For example, to show "total sales by category" as a bar chart, you'd specify category as the dimension and sales as the metric (aggregation method `SUM`).

The number and role of these components that you can specify varies by chart type.

* **Dimension**: XY Chart's **X value**, Radial Chart's **Label**, Map Chart's latitude/longitude, and so on.
* **Metric**: XY Chart's **Y value**, Radial Chart's **Value**, Big Number's **Metric**, and so on.
* **Source filter**: for example, a condition to render only a specific category.

See [Dimensions and metrics](./dimension-metrics) for details on dimensions and metrics.

## In-memory processing {#in-memory-processing}

For chart data processing, if the data source's SQL run result has 1000 rows or fewer and **Custom SQL** isn't specified, equivalent processing is done in the user's browser instead of running new SQL.

This processing is called "in-memory processing," and can be disabled with **Disable in-memory processing** in a chart's **basic settings**. If you use **Custom SQL**, in-memory processing isn't available, and the toggle isn't shown.

See [Pivot Table](../pivot-table#processing-diff) for an example of how results differ depending on whether in-memory processing was used.
