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

# roark dashboard widget update

> Replace a widget

Replaces a widget's definition. It keeps its id and its place on the dashboard.

```bash Synopsis theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
roark dashboard widget update <dashboard-id> <widget-id> [options]
```

> [!NOTE]
>
> Calls `PUT /v1/dashboard/{dashboardId}/widget/{widgetId}`

## Arguments

**dashboard-id** `string` *required*

The dashboard ID.

**widget-id** `string` *required*

The widget ID.

## Options

**--measures** `array` *required*

What to aggregate: 1 to 10 measures.

**--filters** `array`

Applied to every measure, on top of each measure's own filters.

**--interval** `string`

Bucket size. Defaults from the window's length and steps coarser when the window would exceed 500 buckets. One of `HOUR`, `DAY`, `WEEK`, `MONTH`

**--comparison-mode** `string`

`PREVIOUS_PERIOD` adds the preceding window of the same length to every series. One of `NONE`, `PREVIOUS_PERIOD`

**--comparison-groups** `array`

Run every measure once per named filter set, e.g. one group per agent.

**--name** `string` *required*

Unique on the dashboard: how the widget is matched on update.

**--description** `string`

**--display** `string`

Chart type. Defaults to LINE. One of `LINE`, `NUMBER`, `RADAR`, `STACKED_BAR`, `TABLE`

**--size** `string`

Grid width. Defaults to MEDIUM. One of `SMALL`, `MEDIUM`, `LARGE`, `EXTRA_LARGE`

## Example

```bash theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
roark dashboard widget update <dashboard-id> <widget-id> --measures <value> --name <value>
```

Every command also takes the [global options](/cli-reference/overview.md#global-options) and sets one
of the [exit codes](/cli-reference/overview.md#exit-codes).


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