# Dashboard.update Method

> Dashboard.update method in the TX Sheet Control TypeScript API for the browser: Replaces validated presentation properties in one undoable transaction.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Method
- **Path:** TX Sheet Control > API Reference > TypeScript API > Browser Editor > Dashboard > Dashboard.update Method
- **809 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/dashboard/update-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/dashboard/update-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/dashboard/update-method/llms-full.txt

---

Replaces validated presentation properties in one undoable transaction; identity is retained.

Owner: [Dashboard](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/dashboard/llms-full.txt). Package: `@txtextcontrol/tx-sheet-control`. Version: **2.0.0**.

### Syntax

```typescript
update(patch: Partial<Omit<DashboardDefinition, "id">>): void
```

### Parameters

| Parameter | Type | Optional | Description |
|---|---|---|---|
| `patch` | `Partial<Omit<DashboardDefinition, "id">>` | No | Partial supported settings; unspecified fields are retained. |

### Return Value

`void`.

### Examples

Use a fresh sample workbook for this example. In the browser pass editor.workbook; in Node.js pass the server control. Document-bound objects are obtained from that same owner.

```typescript
import type { Workbook } from '@txtextcontrol/tx-sheet-control';

function applyDashboardUpdate(book: Workbook) {
    const sheet = book.sheets.at(0);
    sheet.range('A1:B5').setValues([
        ['Region', 'Revenue'],
        ['North', 42000],
        ['South', 38500],
        ['East', 31200],
        ['West', 44900],
    ]);

    book.analytics.setSource({
        id: 'sales',
        name: 'Regional sales',
        sheetId: sheet.id,
        range: 'A1:B5',
        hasHeaderRow: true,
    });

    const dashboard = book.dashboards.add('Sales overview');
    dashboard.addWidget({
        id: 'revenue',
        type: 'bar',
        title: 'Revenue by region',
        placement: { x: 0, y: 0, width: 6, height: 4 },
        query: {
            sourceId: 'sales',
            dimensions: ['Region'],
            measures: [{ field: 'Revenue', aggregation: 'SUM', alias: 'Revenue' }],
        },
        drillDown: ['Region'],
        interactions: { filter: true, allowSourceData: true },
    });

    dashboard.update({ name: 'Invoice' });
}
```

### Remarks

Use this member on an object from the current document. Reacquire document-bound handles after replacement/deletion. Validate arguments against the declared types and documented bounds; handle exceptions or rejected promises.

### See Also

- [Dashboard Class](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/dashboard/llms-full.txt)
- [Creating Dashboards](https://docs.textcontrol.com/tx-sheet-control/dashboards/creating/llms-full.txt)
- [DashboardDefinition Interface](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/dashboarddefinition/llms-full.txt)

---

## Nearby

- **Previous:** [Dashboard.sourceData Method](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/dashboard/sourcedata-method/llms-full.txt)
- **Next:** [Dashboard.updateWidget Method](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/dashboard/updatewidget-method/llms-full.txt)
