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

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Update dashboard chart

> Applies a JSON merge patch to one chart.

`axiom.updateDashboardChart` applies a JSON merge patch to one chart. Pass the current dashboard `version` or `overwrite: true`; `chart.id` must match `chartId` when present.

```ts automations/axiom-update-dashboard-chart.automation.ts theme={null}
import { automation, onHttpRequest } from "automate.ax"
import { axiom } from "automate.ax/axiom"

export default automation("Update dashboard chart", () => {
  onHttpRequest({ scope: "automation" })
  axiom.updateDashboardChart({
    dashboardUid: "operations",
    chartId: "latency",
    version: "1751546157768154000",
    chart: { name: "API latency" },
  })
})
```

## Inputs

`dashboardUid`, `chartId`, and the JSON merge patch `chart` are required. If `chart.id` is present, it must equal `chartId`. By default, `overwrite` is `false`, so provide the dashboard's current positive decimal `version` string; alternatively set `overwrite: true`. The string preserves Axiom's 64-bit version exactly. Optional `message` records the change.

A JSON merge patch changes only the supplied chart fields. Values set to `null` follow Axiom's merge-patch behavior and can remove optional fields.

## Output

Returns `status` (`"created"` or `"updated"`) and the complete resulting dashboard resource. `overwritten` appears when Axiom reports it.

## Permission and failures

The API token needs the organization-level `dashboards|update` capability. Axiom returns `404` for a missing dashboard or chart, `400` for an invalid patch, and `412` for a version conflict. This mutation is not retried automatically after an ambiguous provider response.
