# Building Charts

## Creating Charts in Airbook

Airbook allows users to create and customize charts to visualize data effectively. This guide outlines the steps to build a chart in Airbook, including selecting data, configuring chart settings, and applying styling options.

{% embed url="<https://youtu.be/35t9uZRyvLw>" %}

### Adding a Chart

1. **Open the Chart Block Menu**
   * Press `/` to bring up the menu.
   * Select **Chart** to insert a chart block.
   * *Note:* This option will only be available if you have created at least one table in your workspace.
2. **Set Up Chart Titles**
   * Your new chart will initially be blank.
   * Use the title and subtitle fields at the top to provide context for your chart.

### Configuring Your Chart

<figure><img src="/files/r6gbfC0x5mq6RqHIbMJ4" alt=""><figcaption></figcaption></figure>

#### 1. Open the Chart Editing Menu

Click anywhere on the blank chart to open the **chart editing menu**. This menu consists of:

* **Left Panel:** Configuration options for data selection and chart settings.
* **Right Panel:** A real-time preview of your chart.

#### 2. Select Data and Chart Type

* Choose a **table** from the left panel to pull data from.
* Select a **chart type**:
  * **Bar Chart**
  * **Line Chart**
  * **Area Chart**
  * **Combo Chart**
  * **Pie Chart**

#### 3. Configure Data for Different Chart Types

**Column, Line, and Area Charts**

* **X-Axis Selection:** Choose one series for the x-axis.
* **Y-Axis Selection:** Select at least one series for the y-axis. You can add multiple series to create a grouped chart.
* **Stacking Options:** If using two or more series, you can:
  * Stack them together.
  * Normalize them to 100% for proportional comparisons.
* **Axis Titles and Ranges:** Customize x-axis and y-axis titles and set value ranges for the y-axis.
* **Date and Time Handling:**
  * If the x-axis represents dates or timestamps, set its type accordingly.
  * Automatically sort data from oldest to newest.
  * Optionally, group data into **months, weeks, quarters, or years**.

**Customizing Series Data**

* Open the **series drawer** to access additional options:
  * Change **series color**.
  * Apply **aggregations** (mean, median, count, etc.) to simplify data analysis without writing SQL.

**Adding Targets**

* Add a **target line** at a specific y-value (e.g., a sales goal for a quarter).

**Customizing Individual Data Points**

* Click a specific column to modify it individually:
  * Highlight a particular data point.
  * Change the color of a specific bar.

**Combo Charts**

* Combo charts allow a mix of **lines and bars** in one visualization.
* Configure each series:
  * Set it as a **line or bar**.
  * Keep it on the same y-axis or add a **right y-axis** for a different measure.

**Pie Charts**

* Select a **category** to define the chart’s slices.
* Choose a **proportion** metric to determine slice sizes.
* Apply aggregations to proportions if needed.

### Customizing Chart Appearance

All charts include a **style panel** for additional customization options including:

* **Sorting options**
* **Gridline visibility**
* **Legend position**
* **Labeling and formatting**

Use these tools to refine the chart’s appearance and ensure it communicates your data effectively.

### Titling your charts

In the space above the graph there are two fields that you can edit to title and subtitle your chart. Use this space to explain to your viewers what they're looking at.


---

# 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.airbook.io/explore/building-charts.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.
