# DashboardDefinition Interface

> DashboardDefinition interface in the TX Sheet Control JavaScript API for the browser, with its syntax and a JavaScript example.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Interface
- **Path:** TX Sheet Control > API Reference > JavaScript API > Browser Editor > DashboardDefinition Interface
- **3112 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/llms-full.txt

---

A first-class workbook view, independent of worksheet cell coordinates. Snapshots are detached and editable.

Package: `@txtextcontrol/tx-sheet-control`. This is a settings/result contract, not a runtime constructor.

### Members

| Property | Description |
|---|---|
| [id](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/id-property/llms-full.txt) | Configures id on DashboardDefinition; apply the complete settings object through its owning dashboard. |
| [name](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/name-property/llms-full.txt) | Configures name on DashboardDefinition; apply the complete settings object through its owning dashboard. |
| [tabColor](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/tabcolor-property/llms-full.txt) | Tab underline color as six-digit hex; null or omitted uses the default theme color. |
| [widgets](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/widgets-property/llms-full.txt) | Configures widgets on DashboardDefinition; apply the complete settings object through its owning dashboard. |
| [layout](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/layout-property/llms-full.txt) | Configures layout on DashboardDefinition; apply the complete settings object through its owning dashboard. |
| [mode](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/mode-property/llms-full.txt) | Configures mode on DashboardDefinition; apply the complete settings object through its owning dashboard. |
| [filters](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/filters-property/llms-full.txt) | Configures filters on DashboardDefinition; apply the complete settings object through its owning dashboard. |
| [defaultFilters](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/defaultfilters-property/llms-full.txt) | Configures defaultFilters on DashboardDefinition; apply the complete settings object through its owning dashboard. |
| [theme](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/theme-property/llms-full.txt) | Configures theme on DashboardDefinition; apply the complete settings object through its owning dashboard. |
| [sections](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/sections-property/llms-full.txt) | Section containers organize cards; widget placement remains on the shared 12-column grid. |
| [parameters](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/parameters-property/llms-full.txt) | Numeric what-if controls. Parameters do not write to worksheet cells. |
| [highlight](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/highlight-property/llms-full.txt) | Selected chart mark for coordinated highlighting; null clears highlighting. |
| [diagnostics](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/diagnostics-property/llms-full.txt) | Configures diagnostics on DashboardDefinition; apply the complete settings object through its owning dashboard. |

### Examples

Configure a complete sales dashboard using this contract. Pass the workbook from your existing editor or server control.

```javascript
async function configureSalesDashboard(book) {
    const sheet = book.sheets.at(0);
    sheet.range('A1:G5').setValues([
        ['Region', 'Country', 'Customer', 'Revenue', 'Profit', 'Date', 'Units'],
        ['Europe', 'Germany', 'Studio', 42000, 12000, '2026-01-15', 12],
        ['Europe', 'France', 'Labs', 38000, 9000, '2026-02-15', 15],
        ['Americas', 'Canada', 'Partners', 31000, 8000, '2026-01-15', 9],
        ['Americas', 'United States', 'Design', 49000, 15000, '2026-02-15', 18]
    ]);
    book.analytics.setSource({ id: 'sales', name: 'Sales', sheetId: sheet.id, range: 'A1:G5', hasHeaderRow: true });
    const dashboard = book.dashboards.add('Sales Performance');
    dashboard.update({ sections: [{ id: 'summary', title: 'Executive Summary' }] });
    dashboard.addWidget({
        id: 'revenue', type: 'column', title: 'Regional Revenue',
        placement: { x: 0, y: 0, width: 8, height: 6 },
        query: { sourceId: 'sales', dimensions: ['Region'], measures: [
            { field: 'Revenue', aggregation: 'SUM', alias: 'Revenue' },
            { field: 'Profit', aggregation: 'SUM', alias: 'Profit' }
        ] }
    });
    const settings = {
        "name": "Sales Performance",
        "widgets": [
            {
                "id": "revenue",
                "type": "column",
                "title": "Regional Revenue",
                "placement": {
                    "x": 0,
                    "y": 0,
                    "width": 8,
                    "height": 6
                },
                "query": {
                    "sourceId": "sales",
                    "dimensions": [
                        "Region"
                    ],
                    "measures": [
                        {
                            "field": "Revenue",
                            "aggregation": "SUM",
                            "alias": "Revenue"
                        },
                        {
                            "field": "Profit",
                            "aggregation": "SUM",
                            "alias": "Profit"
                        }
                    ]
                }
            }
        ],
        "layout": {
            "columns": 12,
            "rowHeight": 48,
            "gap": 16
        },
        "mode": "view",
        "filters": [],
        "defaultFilters": [],
        "theme": {
            "accent": "#75B5FF",
            "background": "#102238",
            "gradient": {
                "type": "linear",
                "angle": 135,
                "stops": [
                    {
                        "offset": 0,
                        "color": "#12335A"
                    },
                    {
                        "offset": 1,
                        "color": "#376E9C"
                    }
                ]
            },
            "surface": "#17385A",
            "textColor": "#F2F6FF",
            "borderColor": "#496586",
            "positiveColor": "#70DDB8",
            "negativeColor": "#FF94A9",
            "fontFamily": "Noto Sans",
            "widgetDefaults": {
                "padding": 20,
                "borderRadius": 16,
                "shadow": {
                    "color": "#000000",
                    "opacity": 0.12,
                    "blur": 16,
                    "offsetX": 0,
                    "offsetY": 4
                }
            }
        },
        "sections": [
            {
                "id": "summary",
                "title": "Executive Summary",
                "backgroundColor": "#DCE8F2",
                "collapsed": false
            }
        ],
        "parameters": [
            {
                "id": "growth",
                "name": "Growth Multiplier",
                "value": 1.1,
                "minimum": 0.8,
                "maximum": 1.4,
                "step": 0.05,
                "choices": [
                    {
                        "label": "Conservative",
                        "value": 1.1
                    },
                    {
                        "label": "Growth",
                        "value": 1.3
                    }
                ]
            }
        ],
        "highlight": {
            "sourceId": "sales",
            "field": "Region",
            "value": "Europe"
        },
        "tabColor": "#376E9C",
        "diagnostics": []
    };
    dashboard.update(settings);
    book.activeView = { type: 'dashboard', id: dashboard.id };
}
```

---

## In This Section

- [DashboardDefinition.defaultFilters Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/defaultfilters-property/llms-full.txt): DashboardDefinition.defaultFilters property in the TX Sheet Control JavaScript API for the browser, with its type AnalyticsFilter[] and a JavaScript example.
- [DashboardDefinition.diagnostics Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/diagnostics-property/llms-full.txt): DashboardDefinition.diagnostics property in the TX Sheet Control JavaScript API for the browser, with its type string[] and a JavaScript example.
- [DashboardDefinition.filters Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/filters-property/llms-full.txt): DashboardDefinition.filters property in the TX Sheet Control JavaScript API for the browser, with its type AnalyticsFilter[] and a JavaScript example.
- [DashboardDefinition.highlight Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/highlight-property/llms-full.txt): DashboardDefinition.highlight property in the TX Sheet Control JavaScript API for the browser, with a JavaScript example.
- [DashboardDefinition.id Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/id-property/llms-full.txt): DashboardDefinition.id property in the TX Sheet Control JavaScript API for the browser, with its type string and a JavaScript example.
- [DashboardDefinition.layout Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/layout-property/llms-full.txt): DashboardDefinition.layout property in the TX Sheet Control JavaScript API for the browser, with its syntax and a JavaScript example.
- [DashboardDefinition.mode Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/mode-property/llms-full.txt): DashboardDefinition.mode property in the TX Sheet Control JavaScript API for the browser, with its type 'design' | 'view' and a JavaScript example.
- [DashboardDefinition.name Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/name-property/llms-full.txt): DashboardDefinition.name property in the TX Sheet Control JavaScript API for the browser, with its type string and a JavaScript example.
- [DashboardDefinition.parameters Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/parameters-property/llms-full.txt): DashboardDefinition.parameters property in the TX Sheet Control JavaScript API for the browser, with its type DashboardParameter[] and a JavaScript example.
- [DashboardDefinition.sections Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/sections-property/llms-full.txt): DashboardDefinition.sections property in the TX Sheet Control JavaScript API for the browser, with its type DashboardSection[] and a JavaScript example.
- [DashboardDefinition.tabColor Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/tabcolor-property/llms-full.txt): DashboardDefinition.tabColor property in the TX Sheet Control JavaScript API for the browser, with its type string | null and a JavaScript example.
- [DashboardDefinition.theme Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/theme-property/llms-full.txt): DashboardDefinition.theme property in the TX Sheet Control JavaScript API for the browser, with its type DashboardTheme and a JavaScript example.
- [DashboardDefinition.widgets Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/widgets-property/llms-full.txt): DashboardDefinition.widgets property in the TX Sheet Control JavaScript API for the browser, with its type DashboardWidget[] and a JavaScript example.

---

## Nearby

- **Previous:** [DashboardWidget.sectionId Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboardwidget/sectionid-property/llms-full.txt)
- **Next:** [DashboardDefinition.id Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/dashboarddefinition/id-property/llms-full.txt)
