> ## Documentation Index
> Fetch the complete documentation index at: https://docs.honeyhive.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Charts

> Define and manage saved charts. Charts are visualizations that aggregate metrics over time with bucketing, filters, and groupings.

## Schema introspection

Every command below with arguments supports two read-only flags for tooling and AI agents:

* `--show-file-schema`: print the JSON Schema for the full request object (the format `--filename` accepts).
* `--show-argument-schema <flag-name>`: print the JSON Schema for one argument's value. Pass the kebab flag name **without** the leading `--` (e.g. `project-id`, not `--project-id`).

Both write pure JSON to stdout and never call the API. They cannot be combined with any other command-specific flag.

## `list`

List charts

Retrieve all charts in a project.

### Usage

```sh theme={null}
honeyhive charts list [options]
```

**Accepted keys:** [Data plane fine-grained API key](https://docs.honeyhive.ai/v2/workspace/api-keys.md#key-types) with `--project-id`; [Project API key](https://docs.honeyhive.ai/v2/workspace/api-keys.md#key-types) without `--project-id` (deprecated)

### Options

| Flag | Type | Required | Description |
| - | - | - | - |
| `--project-id` | string | no | The unique identifier of the project whose charts are listed. Omitting it is deprecated, and it becomes required in the next major version. Pass it with a data plane API key. |

Also supports `--show-file-schema`, `--show-argument-schema <flag-name>`, and `--filename`. See [Schema introspection](#schema-introspection) for details.

## `create`

Create a new chart

Create a chart in a project.

### Usage

```sh theme={null}
honeyhive charts create [options]
```

**Accepted keys:** [Data plane fine-grained API key](https://docs.honeyhive.ai/v2/workspace/api-keys.md#key-types) with `--project-id`; [Project API key](https://docs.honeyhive.ai/v2/workspace/api-keys.md#key-types) without `--project-id` (deprecated)

### Options

| Flag | Type | Required | Description |
| - | - | - | - |
| `--metric` | string | yes | Name of the metric to visualize |
| `--name` | string | yes | Display name for the chart |
| `--bucketing` | string | no | Time bucket granularity for aggregation Allowed: `minute`, `five_minute`, `hour`, `day`, `week`, `month`, `auto`. |
| `--date-range` | json | no | Time range to query |
| `--description` | string | no | Description of what the chart shows |
| `--func` | string | no | Aggregation function to apply (e.g. sum, avg, median, min, max) |
| `--group-by` | string | no | Field to group results by |
| `--owner-id` | string | no | ID of the user who owns this chart |
| `--project-id` | string | no | The unique identifier of the project the chart is created in. Omitting it is deprecated, and it becomes required in the next major version. Pass it with a data plane API key. |
| `--query` | json | no | Filters to apply to the chart data |

Also supports `--show-file-schema`, `--show-argument-schema <flag-name>`, and `--filename`. See [Schema introspection](#schema-introspection) for details.

## `get`

Get a chart

Retrieve a single chart by id.

### Usage

```sh theme={null}
honeyhive charts get [options]
```

**Accepted keys:** [Data plane fine-grained API key](https://docs.honeyhive.ai/v2/workspace/api-keys.md#key-types) with `--project-id`; [Project API key](https://docs.honeyhive.ai/v2/workspace/api-keys.md#key-types) without `--project-id` (deprecated)

### Options

| Flag | Type | Required | Description |
| - | - | - | - |
| `--chart-id` | string | yes | The unique identifier of the chart to retrieve |
| `--project-id` | string | no | The unique identifier of the project that owns the chart. Omitting it is deprecated, and it becomes required in the next major version. Pass it with a data plane API key. |

Also supports `--show-file-schema`, `--show-argument-schema <flag-name>`, and `--filename`. See [Schema introspection](#schema-introspection) for details.

## `update`

Update a chart

Update a chart's editable fields. Only fields included in the request body are modified.

### Usage

```sh theme={null}
honeyhive charts update [options]
```

**Accepted keys:** [Data plane fine-grained API key](https://docs.honeyhive.ai/v2/workspace/api-keys.md#key-types) with `--project-id`; [Project API key](https://docs.honeyhive.ai/v2/workspace/api-keys.md#key-types) without `--project-id` (deprecated)

### Options

| Flag | Type | Required | Description |
| - | - | - | - |
| `--chart-id` | string | yes | The unique identifier of the chart to update |
| `--bucketing` | string | no | Time bucket granularity for aggregation Allowed: `minute`, `five_minute`, `hour`, `day`, `week`, `month`, `auto`. |
| `--date-range` | json | no | Time range to query |
| `--description` | string | no | Description of what the chart shows |
| `--func` | string | no | Aggregation function to apply (e.g. sum, avg, median, min, max) |
| `--group-by` | string | no | Field to group results by |
| `--metric` | string | no | Name of the metric to visualize |
| `--name` | string | no | Display name for the chart |
| `--owner-id` | string | no | ID of the user who owns this chart |
| `--project-id` | string | no | The unique identifier of the project that owns the chart. Omitting it is deprecated, and it becomes required in the next major version. Pass it with a data plane API key. |
| `--query` | json | no | Filters to apply to the chart data |

Also supports `--show-file-schema`, `--show-argument-schema <flag-name>`, and `--filename`. See [Schema introspection](#schema-introspection) for details.

## `delete`

Delete a chart

Delete a chart from a project, removing it from the project's dashboards.

### Usage

```sh theme={null}
honeyhive charts delete [options]
```

**Accepted keys:** [Data plane fine-grained API key](https://docs.honeyhive.ai/v2/workspace/api-keys.md#key-types) with `--project-id`; [Project API key](https://docs.honeyhive.ai/v2/workspace/api-keys.md#key-types) without `--project-id` (deprecated)

### Options

| Flag | Type | Required | Description |
| - | - | - | - |
| `--chart-id` | string | yes | The unique identifier of the chart to delete |
| `--project-id` | string | no | The unique identifier of the project that owns the chart. Omitting it is deprecated, and it becomes required in the next major version. Pass it with a data plane API key. |

Also supports `--show-file-schema`, `--show-argument-schema <flag-name>`, and `--filename`. See [Schema introspection](#schema-introspection) for details.

## `query`

Run a chart query

Aggregate the project's events into one chart result. `query.kind` selects the result shape: time series, categorical, scalar, histogram, or table. Every query must include an `event_type is <type>` or `event_type is not <type>` filter; an `event_type is session` filter queries sessions instead of events. The `scatter` kind and a categorical `split_by` / `split_ranking` are accepted by the schema but not served yet, and answer 501.

### Usage

```sh theme={null}
honeyhive charts query [options]
```

**Accepted keys:** [Data plane fine-grained API key](https://docs.honeyhive.ai/v2/workspace/api-keys.md#key-types)

### Options

| Flag | Type | Required | Description |
| - | - | - | - |
| `--date-range` | json | yes | date\_range |
| `--project-id` | string | yes | The unique identifier of the project whose events are queried |
| `--query` | json | yes | query |
| `--filters` | json | no | Implicit AND; default none |
| `--product-filters` | json | no | product\_filters |

Also supports `--show-file-schema`, `--show-argument-schema <flag-name>`, and `--filename`. See [Schema introspection](#schema-introspection) for details.


## Related topics

- [Delete a chart](https://docs.honeyhive.ai/v2/api-reference-autogen/charts/delete-a-chart.md)
- [Custom Charts](https://docs.honeyhive.ai/v2/monitoring/charts.md)
- [Charts Methods](https://docs.honeyhive.ai/v2/sdk-reference/typescript/ref/charts/index.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.