# Bubble Chart

## 📈 Bubble Chart

A **Bubble Chart** is a powerful way to visualize multi-dimensional data in a single view. It’s especially useful when you want to:

* **Compare multiple metrics** across categories
* Identify **patterns or outliers**
* Show **correlations** between variables
* Represent a fourth variable using **bubble size** or **color**

***

### 🧠 When to Use a Bubble Chart

Use a bubble chart when:

* You have **at least three** numerical measures to plot.
* You want to highlight how **categories** compare across multiple dimensions.
* You need to visualize **volume or magnitude** (with bubble size) and **intensity** (with bubble color).

**Common use cases:**

* Market performance (e.g. sales vs. profit vs. discount)
* Product comparisons (e.g. revenue vs. cost vs. margin)
* Regional analysis (e.g. growth vs. customer base vs. churn)

***

### 🧩 Bubble Chart Attributes

Each bubble represents one data point (e.g. a market or product) and can encode up to **five attributes**:

| Attribute       | Description                                                    | Required    |
| --------------- | -------------------------------------------------------------- | ----------- |
| **Bubble Name** | Label/ID for the bubble (e.g. `Market`)                        | ✅           |
| **X-Position**  | Value on the X-axis (e.g. `Sales`)                             | ✅           |
| **Y-Position**  | Value on the Y-axis (e.g. `Profit`)                            | ✅           |
| **Color**       | Value used for gradient coloring or grouping (e.g. `Quantity`) | ⭕ Optional  |
| **Size**        | Determines the diameter of the bubble (e.g. `Discount`)        | ⭕️ Optional |
| **Order By**    | Optional sorting field (e.g. `Market`)                         | ⭕️ Optional |

> ℹ️ *Color* can be either:
>
> * a **string** to group bubbles by category
> * a **number** to apply a color gradient (e.g., intensity)

***

### 🛠️ Creating a Bubble Chart

#### Step 1: Enter Your Prompt in the builder

In the **Intent panel**, describe what you want to visualize.\
Example prompt:

> `Display a bubble chart showing the sum of sales, profit, quantity, and discount by market.`

Click **Next** to proceed.<br>

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

***

#### Step 2: Map Attributes

The AI would map your fields to the bubble chart properties:

* **Bubble Name** → `Market`
* **X-Position** → `Sum(Sales)`
* **Y-Position** → `Sum(Profit)`
* **Color** → `Sum(Quantity)` *(optional)*
* **Size** → `Sum(Discount)` *(optional)*
* **Order By** → `Market` *(optional)*

Click **Save** to generate the chart.<br>

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

***

### 🎨 Customizing the Chart

To access customization options:

1. Click **Advanced Editor** at the top of the chart.
2. Open the **Styles** tab on the right panel.

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

From there, you can adjust:

* **Chart Title**
* **Gridlines** (horizontal/vertical)
* **Legend** (position and display)
* **Bubble Opacity**
* **Color Range** (gradient stops and min/max)
* **Bubble Font** (text style, color, size)
* **Chart Padding & Zoom**
* **Background Styling**<br>

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

> ⚙️ Advanced users can also switch to the **JSON** tab to directly edit chart config options.

***


---

# 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.getinfinity.app/user-guide/comprehensive-user-guide/2.-charts/featured-chart-examples/bubble-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.
