> For the complete documentation index, see [llms.txt](https://documentation.proto.cx/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.proto.cx/docs/modules/ai-agents/workflows-and-actions/send-graph.md).

# Send graph

`Action` — Renders data as a chart image directly in the chat window.

## What it does

Displays numeric data visually as a chart — bar, line, or pie — so a person can see trends or breakdowns without leaving the conversation.

## When to use it

To show a person their spending breakdown, a trend over time, or any numeric result from an earlier Send API or SQL query action.

## Settings

| Setting              | Description                                                                                                                               |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **Graph type**       | The chart style: Bar, Grouped bar, Stacked bar, Line, Multi-line, or Pie.                                                                 |
| **Chart data input** | A variable or JSON resolving to a list of `{x, y, series}` rows. Entered as a [chat script](/docs/developers/chat-scripts.md) expression. |
| **Graph title**      | The chart's heading.                                                                                                                      |
| **X-axis label**     | Label for the horizontal axis.                                                                                                            |
| **Y-axis label**     | Label for the vertical axis.                                                                                                              |
| **Colour scheme**    | Default, Blue, Green, Grey, Orange, Rose, Violet, Yellow, Neutral, Distinct, Vivid, or Mild.                                              |
| **Show grid lines**  | Toggles grid lines on the chart.                                                                                                          |

Press **Save** to confirm edits.

## Chart data format

The **Chart data input** is always an array of row objects with three fields:

| Field    | Description                                                                                                                                           |
| -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `x`      | The category, time point, or slice label.                                                                                                             |
| `y`      | The numeric value for that row.                                                                                                                       |
| `series` | Groups rows into separate bars/lines. Required for Grouped bar, Stacked bar, and Multi-line; omit it for single-series Bar and Line; ignored for Pie. |

The expected shape per graph type:

{% tabs %}
{% tab title="Bar" %}
A single series — one bar per `x` value. Omit `series`.

```json
[
  { "x": "Jan", "y": 1200 },
  { "x": "Feb", "y": 980 },
  { "x": "Mar", "y": 1450 }
]
```

{% endtab %}

{% tab title="Grouped bar" %}
Multiple bars per `x`, one for each `series`, placed side by side.

```json
[
  { "x": "Jan", "y": 1200, "series": "2023" },
  { "x": "Jan", "y": 1500, "series": "2024" },
  { "x": "Feb", "y": 980,  "series": "2023" },
  { "x": "Feb", "y": 1100, "series": "2024" }
]
```

{% endtab %}

{% tab title="Stacked bar" %}
Same shape as Grouped bar, but each `series` stacks on top of the others within one bar per `x`.

```json
[
  { "x": "Jan", "y": 800, "series": "Food" },
  { "x": "Jan", "y": 400, "series": "Transport" },
  { "x": "Feb", "y": 650, "series": "Food" },
  { "x": "Feb", "y": 330, "series": "Transport" }
]
```

{% endtab %}

{% tab title="Line" %}
A single line connecting each `x` point in order. Omit `series`.

```json
[
  { "x": "Mon", "y": 32 },
  { "x": "Tue", "y": 41 },
  { "x": "Wed", "y": 38 },
  { "x": "Thu", "y": 47 }
]
```

{% endtab %}

{% tab title="Multi-line" %}
One line per `series`, each sharing the same `x` axis.

```json
[
  { "x": "Mon", "y": 32, "series": "Deposits" },
  { "x": "Mon", "y": 18, "series": "Withdrawals" },
  { "x": "Tue", "y": 41, "series": "Deposits" },
  { "x": "Tue", "y": 22, "series": "Withdrawals" }
]
```

{% endtab %}

{% tab title="Pie" %}
One slice per row — `x` is the slice label and `y` is its value. `series` is ignored.

```json
[
  { "x": "Food", "y": 40 },
  { "x": "Transport", "y": 25 },
  { "x": "Bills", "y": 35 }
]
```

{% endtab %}
{% endtabs %}

## Example

```
Send graph
• Type:  Bar
• Data:  {recent_transactions}
• Title: "Your transactions this month"
```

## Related

{% content-ref url="/pages/dS84QlBWMPsz088Q7VcB" %}
[Send API](/docs/modules/ai-agents/workflows-and-actions/send-api.md)
{% endcontent-ref %}

{% content-ref url="/pages/h76VVFDGINQSgTbHDUvJ" %}
[SQL query](/docs/modules/ai-agents/workflows-and-actions/sql-query.md)
{% endcontent-ref %}
