{"id":"JaswxP45860f","url":"https://totaljs.es/docs/dashboard/1-0/guides/introduction/","project":"dashboard","version":"1-0","section":"guides","language":"en","title":"Introduction","summary":"What Total.js Dashboard is, how views, reports and dashboards fit together, and where to start.","markdown":"---\ntitle: Introduction\nproject: Dashboard\nversion: 1.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/dashboard/1-0/guides/introduction/\nupdated: 2026-11-20T06:40:32.732Z\n---\n\n# Introduction\n\n> What Total.js Dashboard is, how views, reports and dashboards fit together, and where to start.\n\n> **Note:** Total.js Dashboard is available only with a [Total.js Enterprise](https://www.totaljs.com/enterprise/) subscription. See the [Dashboard page](https://www.totaljs.com/dashboard/) on totaljs.com.\n\nTotal.js Dashboard turns the data in your PostgreSQL database into dashboards. You describe the data once, build reports on it, and then place charts, lists and key figures on a grid that you arrange with the mouse.\n\n![The Sales overview dashboard with a last value, a trend, a donut chart, a list, a line chart and a bar chart](/files/JaswxN44861f.webp)\n\n## How it works\n\nDashboard has three building blocks. Each one uses the one before it:\n\n1. **Views.** A view is an SQL query plus the list of columns that reports may use. See [Views](../views/).\n2. **Reports.** A report uses one view. It picks the fields, groups and totals them, filters and sorts the rows. A report with **Enable chart view** turns its rows into chart data. See [Reports](../reports/) and [Chart data](../chart-data/).\n3. **Dashboards.** A dashboard is a grid of widgets. Each widget shows the chart data of one or more reports. See [Create a dashboard](../create-dashboard/).\n\nViews and reports work as in [Total.js OpenReports](/openreports/1-0/guides/introduction/), so the OpenReports pages about them apply here too.\n\nDashboard only reads the data that your views select. It keeps its own views, reports and dashboards in a file on the server. See [Back up Dashboard](../backups/).\n\n## What to read next\n\n1. [Install Dashboard](../install/).\n2. [Sign in for the first time](../first-sign-in/).\n3. Describe your data: [Views](../views/).\n4. Build reports with chart data: [Reports](../reports/) and [Chart data](../chart-data/).\n5. Put them on a dashboard: [Create a dashboard](../create-dashboard/) and [Add widgets](../add-widgets/).\n6. Before other people use it, read [Run in production](../production/).\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:40:32.732Z"}
{"id":"JaswxK42861f","url":"https://totaljs.es/docs/dashboard/1-0/guides/install/","project":"dashboard","version":"1-0","section":"guides","language":"en","title":"Install Dashboard","summary":"Get the code, install the dependencies, connect PostgreSQL and start Dashboard.","markdown":"---\ntitle: Install Dashboard\nproject: Dashboard\nversion: 1.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/dashboard/1-0/guides/install/\nupdated: 2026-11-20T06:40:32.732Z\n---\n\n# Install Dashboard\n\n> Get the code, install the dependencies, connect PostgreSQL and start Dashboard.\n\n> **Note:** Total.js Dashboard is available only with a [Total.js Enterprise](https://www.totaljs.com/enterprise/) subscription. See the [Dashboard page](https://www.totaljs.com/dashboard/) on totaljs.com.\n\nDashboard is a Node.js app. You run it on your own computer or server.\n\n## Requirements\n\n- [Node.js](https://nodejs.org) 20 or newer.\n- PostgreSQL 15 or newer, with the data you want to show.\n- A browser with internet access. The screens and the chart libraries load from public CDNs.\n\n## Get the code\n\nTotal.js gives the source code of Dashboard to customers with a [Total.js Enterprise](https://www.totaljs.com/enterprise/) license. See the [Dashboard page](https://www.totaljs.com/dashboard/) on totaljs.com. Unpack it into a folder of its own, for example `dashboard`.\n\n## Install and start\n\n**1.** Open the folder and install the dependencies:\n\n```bash\ncd dashboard\nnpm install\n```\n\n**2.** Open the file `config` in the folder and set `database` to the connection string of your PostgreSQL database:\n\n```text\ndatabase            : postgres://user:password@localhost:5432/sales\n```\n\n**3.** Start Dashboard:\n\n```bash\nnpm start\n```\n\n**4.** Open `http://localhost:8000/` in your browser. See [Sign in for the first time](../first-sign-in/).\n\nDashboard keeps running until you stop it with Ctrl+C in the terminal.\n\n## Use another port\n\n`npm start` uses port 8000. To use another port, start Dashboard with Node.js and pass the port:\n\n```bash\nnode index.js 8080\n```\n\n## Next steps\n\n- Every key of the `config` file: [Configuration](../../reference/configuration/).\n- Before other people use it: [Run in production](../production/).\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:40:32.732Z"}
{"id":"JaswxI40861f","url":"https://totaljs.es/docs/dashboard/1-0/guides/first-sign-in/","project":"dashboard","version":"1-0","section":"guides","language":"en","title":"Sign in for the first time","summary":"Sign in with the first account, change its credentials and find your way around the screen.","markdown":"---\ntitle: Sign in for the first time\nproject: Dashboard\nversion: 1.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/dashboard/1-0/guides/first-sign-in/\nupdated: 2026-11-20T06:40:32.732Z\n---\n\n# Sign in for the first time\n\n> Sign in with the first account, change its credentials and find your way around the screen.\n\nDashboard creates one account the first time it starts, with a random user name and password.\n\n## Sign in\n\n1. Open Dashboard in your browser, for example `http://localhost:8000/`.\n2. The sign-in page shows the box **Default account** with the **User name** and the **Password**. Select **Fill in the form**, or type them yourself.\n3. Select **Sign in**.\n\nThe box **Default account** disappears after the first sign-in. Change the credentials right away, so that only you know them.\n\n![The sign-in page with User name, Password and Sign in](/files/JaswxG3z860f.webp)\n\n## Change the credentials\n\n1. Select your initials in the top right corner, then **Change credentials**.\n2. Enter your **Name**, a **Login** and a new **Password**. Keep the password field empty to keep the current password.\n3. Select **SUBMIT**.\n\nOther open sessions are signed out. Your own session stays open. See [Your account](../account/).\n\n## Find your way around\n\nThe bar on the left opens the screens of Dashboard:\n\n| Screen | What you do there |\n|---|---|\n| **Dashboard** | Look at your dashboards and arrange their widgets. |\n| **Reports** | Create and edit [reports](../reports/). |\n| **Views** | Describe the data with [views](../views/). |\n| **Settings** | The name of the app. See [Settings](../settings/). |\n\nThe buttons at the top right belong to the open screen. In **Dashboard**, the button **Options** holds the commands for dashboards.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:40:32.732Z"}
{"id":"Jaswxg4K861f","url":"https://totaljs.es/docs/dashboard/1-0/guides/views/","project":"dashboard","version":"1-0","section":"guides","language":"en","title":"Views","summary":"Describe the data that reports can use with an SQL query and a list of fields.","markdown":"---\ntitle: Views\nproject: Dashboard\nversion: 1.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/dashboard/1-0/guides/views/\nupdated: 2026-11-20T06:40:32.732Z\n---\n\n# Views\n\n> Describe the data that reports can use with an SQL query and a list of fields.\n\nA view tells Dashboard which data reports may use: an SQL query on your PostgreSQL database and one entry for each column that people can pick. You write views in the **Views** screen.\n\n![The Views screen with one view named Sales](/files/Jaswxf4J860f.webp)\n\n## Create a view\n\n1. Select **Views** in the bar on the left.\n2. Select **Create**. The **View specification** editor opens.\n3. Enter the view as JSON, then select **SUBMIT**.\n\nThis view reads a table of sales:\n\n```json\n{\n\t\"id\": \"sales\",\n\t\"name\": \"Sales\",\n\t\"sql\": \"SELECT region, product, amount, dtcreated FROM demo_sales\",\n\t\"fields\": [\n\t\t{ \"column\": \"region\", \"name\": \"Region\", \"type\": \"string\", \"group\": true },\n\t\t{ \"column\": \"product\", \"name\": \"Product\", \"type\": \"string\", \"group\": true },\n\t\t{ \"output\": \"@\", \"column\": \"amount\", \"name\": \"Amount\", \"type\": \"number\", \"format\": 2 },\n\t\t{ \"column\": \"dtcreated\", \"name\": \"Date\", \"type\": \"date\", \"group\": true }\n\t]\n}\n```\n\nThe view card appears in **Views**, and the view is ready to use in [reports](../reports/).\n\n## Edit or remove a view\n\nSelect the gear icon on the card of a view, then **Edit** or **Remove**. Removing a view also removes every report that uses it.\n\n## More about views\n\nViews work as in OpenReports:\n\n- [Create a view](/openreports/1-0/guides/create-view/): how the SQL and the fields work, with tips.\n- [Edit and remove views](/openreports/1-0/guides/edit-views/): how to change a field without breaking reports.\n- [View definition](/openreports/1-0/reference/view-definition/): every key of the JSON.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:40:32.732Z"}
{"id":"JaswxZ4E861f","url":"https://totaljs.es/docs/dashboard/1-0/guides/reports/","project":"dashboard","version":"1-0","section":"guides","language":"en","title":"Reports","summary":"Create reports that pick, group, filter and sort the data of a view.","markdown":"---\ntitle: Reports\nproject: Dashboard\nversion: 1.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/dashboard/1-0/guides/reports/\nupdated: 2026-11-20T06:40:32.732Z\n---\n\n# Reports\n\n> Create reports that pick, group, filter and sort the data of a view.\n\nA report takes the data of one view and shapes it. Dashboards show the data of reports, so you build a report for each chart, list or figure you want to see.\n\n![The Reports screen with three reports in the category Sales](/files/JaswxW4C861f.webp)\n\n## Create a report\n\n1. Select **Reports** in the bar on the left, then **Create**. The **Create report** form opens.\n2. In **Name**, enter a name, for example `Sales by region`.\n3. In **View**, choose the view the report reads.\n4. Choose the **Group**, **Fields**, **Filter** and **Sort** of the report.\n5. To use the report on a dashboard, select **Enable chart view** and fill in the chart settings. See [Chart data](../chart-data/).\n6. Select **SUBMIT**.\n\nThe form also has **Private report**, **Category**, **Icon**, **Color**, **Note** and **Limit output to**. Reports with the same **Category** appear together under its name.\n\nThe parts of the form work as in OpenReports:\n\n- [Fields and sorting](/openreports/1-0/guides/fields-and-sorting/)\n- [Group and total](/openreports/1-0/guides/group-and-total/)\n- [Filter rows](/openreports/1-0/guides/filters/) and [Filter types](/openreports/1-0/reference/filter-types/)\n- [Dynamic filters](/openreports/1-0/guides/dynamic-filters/)\n\n## Work with a report\n\nSelect the card of a report to see its data, or select its gear icon for more:\n\n![The menu of a report: Browse data, Show chart, Clone, Edit and Remove](/files/JaswxX4D860f.webp)\n\n| Command | What it does |\n|---|---|\n| **Browse data** | Opens the rows of the report. You can copy them or download them as CSV or XLSX. See [Browse and export data](/openreports/1-0/guides/browse-data/). |\n| **Show chart** | Opens the chart of a report with **Enable chart view**. |\n| **Clone** | Makes a copy named after the report with `(cloned)` at the end. |\n| **Edit** | Opens the form of the report. |\n| **Remove** | Removes the report. |\n\nUse **Search** above the cards to find a report by its name.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:40:32.732Z"}
{"id":"JaswxA3t860f","url":"https://totaljs.es/docs/dashboard/1-0/guides/chart-data/","project":"dashboard","version":"1-0","section":"guides","language":"en","title":"Chart data","summary":"Turn a report into chart data with an X axis, a Y axis, series, decimals and a format.","markdown":"---\ntitle: Chart data\nproject: Dashboard\nversion: 1.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/dashboard/1-0/guides/chart-data/\nupdated: 2026-11-20T06:40:32.732Z\n---\n\n# Chart data\n\n> Turn a report into chart data with an X axis, a Y axis, series, decimals and a format.\n\nWidgets show the chart data of reports. A report has chart data when **Enable chart view** is selected in its form. Only these reports appear when you choose the dataset of a widget.\n\n![The Chart settings of a report: X axis Date, Y axis Amount SUM, Decimals 2 and Format {0} EUR](/files/Jaswx83s861f.webp)\n\n## Set up the chart data\n\n1. In **Reports**, select the gear icon of the report, then **Edit**.\n2. Select **Enable chart view**. The section **Chart settings** appears.\n3. Fill in the settings below, then select **SUBMIT**.\n\n| Setting | What it does |\n|---|---|\n| **X axis** | The field for the labels, for example the date or the region. Required. |\n| **Y axis** | The number field for the values, for example **Amount SUM**. Required. |\n| **Series for** | Optional. Splits the data into one series for each value of this field, for example one line for each product. |\n| **Decimals** | The number of decimals of the values. |\n| **Format** | How a value is written. `{0}` stands for the number, so `{0} EUR` shows `61 627 EUR`. Required. |\n\nThe axes offer the fields of the report, so add them to **Fields** first.\n\n## Tips\n\n- One row of the report is one point of the chart. A grouped report usually works best: one row for each region, with the sum of its sales. See [Group and total](/openreports/1-0/guides/group-and-total/).\n- The order of the rows is the order of the points. Sort by the date to draw a line from the oldest to the newest month.\n- Widgets that show one value, such as **Last value**, start with the first row. Sort the report newest first to show the latest value first.\n- To check the data, select the gear icon of the report and then **Browse data**.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:40:32.732Z"}
{"id":"JaswxF3x860f","url":"https://totaljs.es/docs/dashboard/1-0/guides/create-dashboard/","project":"dashboard","version":"1-0","section":"guides","language":"en","title":"Create a dashboard","summary":"Create a dashboard and set its name, icon and colour.","markdown":"---\ntitle: Create a dashboard\nproject: Dashboard\nversion: 1.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/dashboard/1-0/guides/create-dashboard/\nupdated: 2026-11-20T06:40:32.732Z\n---\n\n# Create a dashboard\n\n> Create a dashboard and set its name, icon and colour.\n\nA dashboard is a grid of widgets with a name. You can have as many dashboards as you like.\n\nWhen you open **Dashboard** and no dashboard exists yet, the **Create dashboard** form opens by itself.\n\n## Create a dashboard\n\n1. Select **Dashboard** in the bar on the left.\n2. Select **Options**, then **Create new**.\n3. In **Name**, enter a name, for example `Sales overview`.\n4. Optionally, choose an **Icon** and a **Color**.\n5. Select **SUBMIT**.\n\nThe new dashboard opens. Its name appears at the top of the screen. Now [add widgets](../add-widgets/) to it.\n\n![The dashboard form with Name, Allow all users to see this dashboard, Read-only for all users, Icon and Color](/files/JaswxC3v860f.webp)\n\n## The form\n\n| Setting | What it does |\n|---|---|\n| **Name** | The name at the top of the screen and in the list of dashboards. Required. |\n| **Allow all users to see this dashboard** | Shows the dashboard to every user of the app, not only to you. |\n| **Read-only for all users** | Other users can look at the dashboard but not change its widgets. Selected by default. |\n| **Icon** | The icon in the list of dashboards. |\n| **Color** | The colour of the dashboard. |\n\nThe two options about users matter when several people use the app.\n\n## Create a dashboard from the list\n\nYou can also type a new name in the list of dashboards:\n\n1. Select the name of the open dashboard at the top of the screen.\n2. Type the name of the new dashboard in **Search or create new** and press Enter.\n\n![The list of dashboards with the box Search or create new](/files/JaswxD3w861f.webp)\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:40:32.732Z"}
{"id":"Jaswx33m861f","url":"https://totaljs.es/docs/dashboard/1-0/guides/add-widgets/","project":"dashboard","version":"1-0","section":"guides","language":"en","title":"Add widgets","summary":"Drag widgets onto a dashboard and choose the report data they show.","markdown":"---\ntitle: Add widgets\nproject: Dashboard\nversion: 1.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/dashboard/1-0/guides/add-widgets/\nupdated: 2026-11-20T06:40:32.732Z\n---\n\n# Add widgets\n\n> Drag widgets onto a dashboard and choose the report data they show.\n\nWidgets are the charts, lists and figures of a dashboard. You drag them from the **Widgets** window onto the grid, then choose the data they show.\n\n![The Widgets window open next to a dashboard](/files/Jaswx03k861f.webp)\n\n## Add a widget\n\n1. Open the dashboard.\n2. Select **Options**, then **Toggle widgets**. The **Widgets** window opens. Use **Search widgets** to find one by its name.\n3. Drag a widget from the window to a free place on the grid.\n\nThe new widget shows **Nothing to show** until you choose its data.\n\n## Choose the data\n\n1. Select the gear icon in the title bar of the widget. Its settings open.\n2. Select **Dataset**. A list of the reports with chart data opens. See [Chart data](../chart-data/).\n3. Select a report. It appears below **Dataset**. Some widgets take up to three reports; select **Dataset** again to add more.\n4. Optionally, set the other settings, for example **Refresh interval**.\n5. Select **SUBMIT**. The widget loads the data.\n\n![The settings of a widget with the report Sales by region in Dataset and Refresh interval 0](/files/Jaswx23l860f.webp)\n\nTo take a report away, select the red bin icon in front of its name.\n\n## Refresh the data\n\nA widget loads its data when the dashboard opens. **Refresh interval** reloads it every that many seconds; `0` turns it off.\n\nEvery widget and its settings are described in [Widgets](../../reference/widgets/).\n\nWhen you are done, close the **Widgets** window with its red cross. Next: [Arrange widgets](../arrange-widgets/).\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:40:32.732Z"}
{"id":"Jaswx53o861f","url":"https://totaljs.es/docs/dashboard/1-0/guides/arrange-widgets/","project":"dashboard","version":"1-0","section":"guides","language":"en","title":"Arrange widgets","summary":"Move, resize, rename and remove the widgets of a dashboard.","markdown":"---\ntitle: Arrange widgets\nproject: Dashboard\nversion: 1.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/dashboard/1-0/guides/arrange-widgets/\nupdated: 2026-11-20T06:40:32.732Z\n---\n\n# Arrange widgets\n\n> Move, resize, rename and remove the widgets of a dashboard.\n\nYou arrange the widgets of a dashboard with the mouse. Dashboard saves every change by itself, a moment after you make it.\n\n## Move a widget\n\nDrag the widget by its title bar to another place on the grid. Grab the bar beside the title, not the title itself.\n\n## Resize a widget\n\nDrag the corner at the bottom right of the widget. The widget snaps to the grid.\n\n## Rename a widget\n\n1. Select the title of the widget. It becomes a text box.\n2. Type the new title and press Enter.\n\nA new widget is named after its type, for example **Bar chart Apex**. A clear title such as `Sales by region` helps the people who read the dashboard.\n\n## Remove a widget\n\n1. Select the bin icon in the title bar of the widget.\n2. Confirm with **Remove**.\n\n## Preview other screen sizes\n\nSelect **Options**, then **Resize**, and choose **Large display**, **Medium display**, **Small display** or **Extra small display** to see the dashboard at that width. **Auto** goes back to the width of your window.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:40:32.732Z"}
{"id":"JaswxS48861f","url":"https://totaljs.es/docs/dashboard/1-0/guides/manage-dashboards/","project":"dashboard","version":"1-0","section":"guides","language":"en","title":"Manage dashboards","summary":"Switch between dashboards, change their name and options, or remove them.","markdown":"---\ntitle: Manage dashboards\nproject: Dashboard\nversion: 1.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/dashboard/1-0/guides/manage-dashboards/\nupdated: 2026-11-20T06:40:32.732Z\n---\n\n# Manage dashboards\n\n> Switch between dashboards, change their name and options, or remove them.\n\nThe commands for dashboards are in **Options** at the top right of the **Dashboard** screen.\n\n![The Options menu: Refresh, Create new, Toggle widgets, Update meta data, Remove and Resize](/files/JaswxR47860f.webp)\n\n## Switch to another dashboard\n\n1. Select the name of the open dashboard at the top of the screen.\n2. Select another dashboard in the list, or type a part of its name to find it.\n\nThe address in your browser ends with the ID of the open dashboard, so you can bookmark it.\n\n## Change the name and options\n\n1. Open the dashboard.\n2. Select **Options**, then **Update meta data**. The **Update dashboard** form opens.\n3. Change the name, the options, the icon or the colour. See [Create a dashboard](../create-dashboard/).\n4. Select **SUBMIT**.\n\n## Remove a dashboard\n\n1. Open the dashboard.\n2. Select **Options**, then **Remove**.\n3. Confirm with **Remove**.\n\nThe dashboard and its widgets are removed. The reports and views they used stay.\n\n## The Options menu\n\n| Command | What it does |\n|---|---|\n| **Refresh** | Reloads the list of dashboards. |\n| **Create new** | Opens the form for a new dashboard. |\n| **Toggle widgets** | Opens the **Widgets** window. See [Add widgets](../add-widgets/). |\n| **Update meta data** | Changes the name, options, icon and colour. |\n| **Remove** | Removes the open dashboard. |\n| **Resize** | Shows the dashboard at the width of another screen. See [Arrange widgets](../arrange-widgets/). |\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:40:32.732Z"}
{"id":"Jaswwx3i861f","url":"https://totaljs.es/docs/dashboard/1-0/guides/account/","project":"dashboard","version":"1-0","section":"guides","language":"en","title":"Your account","summary":"Change your name, login and password, and sign out.","markdown":"---\ntitle: Your account\nproject: Dashboard\nversion: 1.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/dashboard/1-0/guides/account/\nupdated: 2026-11-20T06:40:32.732Z\n---\n\n# Your account\n\n> Change your name, login and password, and sign out.\n\nDashboard has one account. Its menu opens when you select your initials in the top right corner.\n\n![The account menu with Change credentials and Logout](/files/Jaswww3h860f.webp)\n\n## Change the credentials\n\n1. Select your initials, then **Change credentials**.\n2. Change the **Name**, the **Login** or the **Password**. Keep **Password** empty to keep the current one.\n3. Select **SUBMIT**.\n\nAll other open sessions are signed out. Your own session stays open.\n\n## Sign out\n\nSelect your initials, then **Logout**. The sign-in page opens.\n\nA session lasts one month unless you sign out.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:40:32.732Z"}
{"id":"JaswxU4A861f","url":"https://totaljs.es/docs/dashboard/1-0/guides/production/","project":"dashboard","version":"1-0","section":"guides","language":"en","title":"Run in production","summary":"Make a Dashboard server ready for other people: release mode, credentials, HTTPS and access.","markdown":"---\ntitle: Run in production\nproject: Dashboard\nversion: 1.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/dashboard/1-0/guides/production/\nupdated: 2026-11-20T06:40:32.732Z\n---\n\n# Run in production\n\n> Make a Dashboard server ready for other people: release mode, credentials, HTTPS and access.\n\nBefore other people use Dashboard, prepare the server.\n\n## Change the first credentials\n\nThe sign-in page shows the first account to anyone until somebody signs in. Start Dashboard where only you can reach it, sign in, and change the credentials. See [Sign in for the first time](../first-sign-in/).\n\n## Start in release mode\n\n`npm start` runs Dashboard in debug mode, which watches the files and restarts the app when they change. On a server, start it in release mode:\n\n```bash\nnode index.js 8000 --release\n```\n\nUse a process manager or a system service so that Dashboard starts again after a restart of the server.\n\n## Use HTTPS\n\nPut Dashboard behind a web server such as NGINX that handles HTTPS, and let it forward the requests to the port of Dashboard. Then people sign in over an encrypted connection.\n\n## Limit who can reach it\n\n- Let only the people who need Dashboard reach the server, for example through a firewall or a VPN.\n- Give the database user in `database` read access only to the tables your views use. Dashboard only reads data.\n- If you turn on the [Reports API](../../reference/reports-api/), use a long random token and keep it secret.\n\n## Back up\n\nBack up the data of Dashboard regularly. See [Back up Dashboard](../backups/).\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:40:32.732Z"}
{"id":"Jaswx63q861f","url":"https://totaljs.es/docs/dashboard/1-0/guides/backups/","project":"dashboard","version":"1-0","section":"guides","language":"en","title":"Back up Dashboard","summary":"The files that hold your views, reports, dashboards and account, and how to back them up.","markdown":"---\ntitle: Back up Dashboard\nproject: Dashboard\nversion: 1.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/dashboard/1-0/guides/backups/\nupdated: 2026-11-20T06:40:32.732Z\n---\n\n# Back up Dashboard\n\n> The files that hold your views, reports, dashboards and account, and how to back them up.\n\nDashboard keeps its own data in files in the folder `databases` of the app. Your business data stays in PostgreSQL.\n\n| File | What it holds |\n|---|---|\n| `databases/memorize_data.json` | Views, reports, dashboards with their widgets, and the settings. |\n| `databases/memorize_account.json` | The account: name, login and the hash of the password. |\n\nIf you added your own widgets, the folder `dashboard` holds them too. See [Custom widgets](../../development/custom-widgets/).\n\n## Make a backup\n\n1. Stop Dashboard.\n2. Copy the folder `databases` and the file `config` to a safe place. Add the folder `dashboard` if you changed or added widgets.\n3. Start Dashboard again.\n\nFor example:\n\n```bash\ntar -czf dashboard-backup.tar.gz databases config dashboard\n```\n\n## Restore a backup\n\n1. Stop Dashboard.\n2. Put the saved folder `databases` and the file `config` back into the folder of the app.\n3. Start Dashboard.\n\nBack up PostgreSQL with its own tools, such as `pg_dump`.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:40:32.732Z"}
{"id":"Jaswxc4H860f","url":"https://totaljs.es/docs/dashboard/1-0/guides/settings/","project":"dashboard","version":"1-0","section":"guides","language":"en","title":"Settings","summary":"Change the name of the app in the Settings screen.","markdown":"---\ntitle: Settings\nproject: Dashboard\nversion: 1.0\nsection: guides\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/dashboard/1-0/guides/settings/\nupdated: 2026-11-20T06:40:32.732Z\n---\n\n# Settings\n\n> Change the name of the app in the Settings screen.\n\nThe **Settings** screen holds the name of the app.\n\n![The Settings screen with the App name field](/files/Jaswxb4G861f.webp)\n\n## Change the name of the app\n\n1. Select **Settings** in the bar on the left.\n2. Enter the new name in **App name**.\n3. Select **SUBMIT**.\n\nThe name appears at the top left of every screen, on the sign-in page and as the title of the browser tab.\n\nThe settings are saved with your views and reports. See [Back up Dashboard](../backups/).\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:40:32.732Z"}
{"id":"Jaswxi4M861f","url":"https://totaljs.es/docs/dashboard/1-0/reference/configuration/","project":"dashboard","version":"1-0","section":"reference","language":"en","title":"Configuration","summary":"The keys of the config file that you change when you install Dashboard.","markdown":"---\ntitle: Configuration\nproject: Dashboard\nversion: 1.0\nsection: reference\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/dashboard/1-0/reference/configuration/\nupdated: 2026-11-20T06:40:32.732Z\n---\n\n# Configuration\n\n> The keys of the config file that you change when you install Dashboard.\n\nThe file `config` in the folder of the app holds the settings that Dashboard reads when it starts. Each line is a key, a colon and a value. Lines that start with `//` are comments. Restart Dashboard after you change the file.\n\n```text\ndatabase            : postgres://user:password@localhost:5432/sales\nautowidgetwatcher   : true\napi                 : true\ntoken               : 3f9c0d1e8b7a4c2f9e6d5a4b3c2d1e0f\n```\n\n| Key | Value | What it does |\n|---|---|---|\n| `database` | Connection string | The PostgreSQL database that your views read, as `postgres://user:password@host:port/database`. |\n| `autowidgetwatcher` | `true` or `false` | With `true`, Dashboard notices new, changed and removed files in the folder `dashboard` within a few seconds, without a restart. See [Custom widgets](../../development/custom-widgets/). |\n| `api` | `true` or `false` | Turns the [Reports API](../reports-api/) on. It is off when the key is missing. |\n| `token` | Text | The secret that programs send to use the [Reports API](../reports-api/). Use a long random value. |\n\nKeep the file private: it holds the password of your database and the token of the API.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:40:32.732Z"}
{"id":"Jaswxl4Q861f","url":"https://totaljs.es/docs/dashboard/1-0/reference/widgets/","project":"dashboard","version":"1-0","section":"reference","language":"en","title":"Widgets","summary":"Every built-in widget, what it shows and its settings.","markdown":"---\ntitle: Widgets\nproject: Dashboard\nversion: 1.0\nsection: reference\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/dashboard/1-0/reference/widgets/\nupdated: 2026-11-20T06:40:32.732Z\n---\n\n# Widgets\n\n> Every built-in widget, what it shows and its settings.\n\nEvery widget shows the [chart data](../../guides/chart-data/) of one or more reports. You choose them in **Dataset** in the settings of the widget. See [Add widgets](../../guides/add-widgets/).\n\n## Charts\n\n| Widget | What it shows | Reports in Dataset |\n|---|---|---|\n| **Bar chart Apex** | Horizontal bars, one for each point. | up to 3 |\n| **Line chart Apex** | A line through the points, in the order of the rows. | 1 |\n| **Multiple chart Apex** | Several reports in one chart, each with its own value axis. | up to 3 |\n| **Donut chart Apex** | A ring split into the points, with a legend. | 1 |\n| **Pie chart Apex** | A pie split into the points, with a legend. | 1 |\n| **Bar chart** | Bars, one for each point. | up to 3 |\n| **Line chart** | Lines through the points. | up to 3 |\n| **Multiple chart** | Several reports in one chart, each with its own value axis. | up to 3 |\n| **Donut chart** | A ring split into the points. | 1 |\n| **Pie chart** | A pie split into the points. | 1 |\n\nThe **Apex** widgets draw with ApexCharts, loaded from `cdnjs.cloudflare.com`. The other charts draw with Highcharts, loaded from `code.highcharts.com`. The browser that opens the dashboard must reach these addresses.\n\nEvery chart has one more setting: **Refresh interval**.\n\n## Figures and lists\n\n| Widget | What it shows | Reports in Dataset |\n|---|---|---|\n| **Last value** | The value and the label of one row in large type, with the icon and name of the report. The arrows below it go to the next and previous rows. It starts with the first row. | 1 |\n| **Trend** | The value of one row, an arrow up or down, and the average of the other rows. | 1 |\n| **List** | The name of the report, the number of rows, and each row with its label and value. | 1 |\n\n## Settings\n\n| Setting | Widgets | What it does |\n|---|---|---|\n| **Dataset** | All | The reports whose chart data the widget shows. |\n| **Refresh interval** | All | Reloads the data every that many seconds. `0` turns it off. |\n| **Records count** | Last value, Trend, List | Uses only the first that many rows. `0` uses all rows. The default is `20`. |\n| **Order** | Trend | **Latest** compares the first row with the average of the other rows. **Oldest** compares the last row with the average of the other rows. |\n| **Use the median for the calculation** | Trend | Compares with the median of the values instead of the average. |\n\nValues are written with the **Decimals** and **Format** of the report. Dates of the X axis show as day, month and year.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:40:32.732Z"}
{"id":"Jaswxj4O861f","url":"https://totaljs.es/docs/dashboard/1-0/reference/reports-api/","project":"dashboard","version":"1-0","section":"reference","language":"en","title":"Reports API","summary":"Read the list of reports and their data over HTTP with a token.","markdown":"---\ntitle: Reports API\nproject: Dashboard\nversion: 1.0\nsection: reference\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/dashboard/1-0/reference/reports-api/\nupdated: 2026-11-20T06:40:32.732Z\n---\n\n# Reports API\n\n> Read the list of reports and their data over HTTP with a token.\n\nOther programs can list your reports and load their data over HTTP. The API is off until you turn it on in the `config` file.\n\n## Turn it on\n\n1. Add these keys to the file `config`, with your own long random token:\n\n```text\napi                 : true\ntoken               : 3f9c0d1e8b7a4c2f9e6d5a4b3c2d1e0f\n```\n\n2. Restart Dashboard.\n\nSend the token with every request, in the header `x-token` or in the query argument `token`. Without the right token, or while the API is off, the API answers `401: Unauthorized`.\n\n[Private reports](../../guides/reports/) are not listed and cannot be loaded through the API.\n\n## List reports\n\n`GET /reports/` returns the reports with their fields and their [dynamic filters](/openreports/1-0/guides/dynamic-filters/).\n\n```bash\ncurl -H 'x-token: 3f9c0d1e8b7a4c2f9e6d5a4b3c2d1e0f' http://localhost:8000/reports/\n```\n\n```json\n[\n\t{\n\t\t\"id\": \"JasoWU1dx60f\",\n\t\t\"name\": \"Sales by region\",\n\t\t\"category\": \"Sales\",\n\t\t\"filter\": [],\n\t\t\"fields\": [\n\t\t\t{ \"id\": \"x1jkk54k\", \"name\": \"Region\", \"datatype\": \"string\" },\n\t\t\t{ \"id\": \"amount\", \"type\": \"sum\", \"name\": \"Amount\", \"datatype\": \"number\" }\n\t\t],\n\t\t\"chart\": true,\n\t\t\"x\": \"x1jkk54k\",\n\t\t\"y\": \"amount\",\n\t\t\"series\": \"\"\n\t}\n]\n```\n\n## Load a report\n\n`POST /reports/` with the `id` of the report runs it and returns its fields and rows.\n\n```bash\ncurl -X POST -H 'x-token: 3f9c0d1e8b7a4c2f9e6d5a4b3c2d1e0f' -H 'Content-Type: application/json' \\\n\t-d '{\"id\":\"JasoWU1dx60f\"}' http://localhost:8000/reports/\n```\n\n```json\n{\n\t\"fields\": [\n\t\t{ \"id\": \"x1jkk54k\", \"name\": \"Region\", \"datatype\": \"string\" },\n\t\t{ \"id\": \"amount\", \"name\": \"Amount\", \"datatype\": \"number\", \"type\": \"sum\", \"format\": 2 }\n\t],\n\t\"rows\": [\n\t\t{ \"x1jkk54k\": \"West\", \"amount\": 61627.42 },\n\t\t{ \"x1jkk54k\": \"North\", \"amount\": 61365.73 },\n\t\t{ \"x1jkk54k\": \"South\", \"amount\": 60752.96 },\n\t\t{ \"x1jkk54k\": \"East\", \"amount\": 57640.19 }\n\t]\n}\n```\n\nTo set the values of dynamic filters, add `\"filter\": [{ \"id\": \"<field id>\", \"value\": \"<value>\" }]` to the body.\n\n## Load the chart data\n\nAdd `\"chart\": true` to load the [chart data](../../guides/chart-data/) of a report with **Enable chart view**. The answer is a list of series with points `x` and `y`:\n\n```json\n[\n\t{\n\t\t\"id\": \"JasoWU1dx60f\",\n\t\t\"name\": \"Sales by region\",\n\t\t\"icon\": \"ti ti-globe\",\n\t\t\"color\": \"#34A853\",\n\t\t\"data\": [\n\t\t\t{ \"x\": \"West\", \"y\": 61627.42 },\n\t\t\t{ \"x\": \"North\", \"y\": 61365.73 },\n\t\t\t{ \"x\": \"South\", \"y\": 60752.96 },\n\t\t\t{ \"x\": \"East\", \"y\": 57640.19 }\n\t\t],\n\t\t\"format\": \"{0} EUR\",\n\t\t\"decimals\": 0\n\t}\n]\n```\n\nA report with **Series for** returns one series for each value of that field.\n\nAn unknown or private report answers `404: Not Found`.\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:40:32.732Z"}
{"id":"Jaswws3d860f","url":"https://totaljs.es/docs/dashboard/1-0/faq/dashboards/","project":"dashboard","version":"1-0","section":"faq","language":"en","title":"Dashboards and widgets","summary":"Answers to common questions about dashboards, widgets and their data.","markdown":"---\ntitle: Dashboards and widgets\nproject: Dashboard\nversion: 1.0\nsection: faq\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/dashboard/1-0/faq/dashboards/\nupdated: 2026-11-20T06:40:32.732Z\n---\n\n# Dashboards and widgets\n\n> Answers to common questions about dashboards, widgets and their data.\n\n## My report is not in the Dataset list. Why?\n\nOnly reports with **Enable chart view** appear there. Edit the report, select **Enable chart view**, choose the **X axis** and **Y axis** and select **SUBMIT**. See [Chart data](../../guides/chart-data/).\n\n## A widget says Nothing to show\n\nThe widget has no report in **Dataset** yet. Select its gear icon and choose one. See [Add widgets](../../guides/add-widgets/).\n\n## Last value shows the oldest value\n\n**Last value** starts with the first row of the report. Sort the report newest first, for example by the date in descending order, and the latest value comes first.\n\n## The numbers have the wrong unit or too many decimals\n\nWidgets write values with the **Format** and **Decimals** of the report. Change them in the chart settings of the report.\n\n## Do I have to reload the page to see new data?\n\nNo. Set **Refresh interval** in the settings of the widget, for example `60` to reload every minute. Opening the dashboard also loads fresh data.\n\n## Can I make my own widget?\n\nYes. A widget is one HTML file in the folder `dashboard`. See [Custom widgets](../../development/custom-widgets/).\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:40:32.732Z"}
{"id":"Jaswwu3f860f","url":"https://totaljs.es/docs/dashboard/1-0/faq/setup/","project":"dashboard","version":"1-0","section":"faq","language":"en","title":"Setup and data","summary":"Answers to common questions about installing Dashboard and where it keeps its data.","markdown":"---\ntitle: Setup and data\nproject: Dashboard\nversion: 1.0\nsection: faq\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/dashboard/1-0/faq/setup/\nupdated: 2026-11-20T06:40:32.732Z\n---\n\n# Setup and data\n\n> Answers to common questions about installing Dashboard and where it keeps its data.\n\n## Does Dashboard change my database?\n\nNo. Your views only read data with `SELECT`. Dashboard keeps its views, reports and dashboards in the folder `databases` of the app. See [Back up Dashboard](../../guides/backups/).\n\n## How do I use another port?\n\nPass the port when you start Dashboard, for example `node index.js 8080`. See [Install Dashboard](../../guides/install/).\n\n## A chart stays empty\n\nThe screens and the chart libraries load from public CDNs. Check that the browser can reach `cdn.componentator.com`, `cdnjs.cloudflare.com` and `code.highcharts.com`.\n\n## Can other programs read my reports?\n\nYes, through the [Reports API](../../reference/reports-api/), once you turn it on in the `config` file.\n\n## Where do views and reports come from?\n\nThey work as in Total.js OpenReports. See [Views](../../guides/views/) and [Reports](../../guides/reports/).\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:40:32.732Z"}
{"id":"Jaswy64W861f","url":"https://totaljs.es/docs/dashboard/1-0/development/custom-widgets/","project":"dashboard","version":"1-0","section":"development","language":"en","title":"Custom widgets","summary":"Add your own widget to Dashboard with one HTML file in the folder dashboard.","markdown":"---\ntitle: Custom widgets\nproject: Dashboard\nversion: 1.0\nsection: development\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/dashboard/1-0/development/custom-widgets/\nupdated: 2026-11-20T06:40:27.732Z\n---\n\n# Custom widgets\n\n> Add your own widget to Dashboard with one HTML file in the folder dashboard.\n\nEvery widget of Dashboard is one HTML file in the folder `dashboard` of the app. Add your own file there and it appears in the **Widgets** window like the built-in ones. The file name without `.html` is the ID of the widget.\n\nWith `autowidgetwatcher : true` in the `config` file, Dashboard picks up new, changed and removed files within a few seconds. Without it, restart Dashboard. See [Configuration](../../reference/configuration/).\n\n## The parts of the file\n\nA widget file has three parts:\n\n| Part | Runs in | What it holds |\n|---|---|---|\n| `<script total>` | the server | The name, icon and default settings of the widget, and optional [data sources](../data-sources/). |\n| `<settings>` | the browser | The HTML of the settings form of the widget. |\n| `<body>` | the browser | The `<style>` and the `<script>` that draw the widget. |\n\n## A first widget\n\nThis widget, saved as `dashboard/total.html`, adds up the values of one report and shows the sum:\n\n```html\n<script total>\n\texports.name = 'Total';\n\texports.icon = 'ti ti-calculator';\n\texports.color = '#34A853';\n\texports.config = { dataset: [], interval: 0 };\n</script>\n\n<settings>\n\t<div class=\"padding\">\n\t\t<ui-component name=\"dataset\" path=\"?.dataset\" config=\"type:chart;limit:1\" class=\"m\">Dataset</ui-component>\n\t\t<ui-component name=\"input\" path=\"?.interval\" config=\"type:number\">Refresh interval</ui-component>\n\t</div>\n</settings>\n\n<body>\n\t<style>\n\t\t.CLASS .total { height: 100%; display: flex; align-items: center; justify-content: center; font-weight: bold; }\n\t</style>\n\t<script>\n\t\texports.offset = { lg: { width: 3, height: 2 }, md: { width: 4, height: 3 }, xs: { width: 6, height: 3 } };\n\t\texports.actions = { move: true, remove: true, resize: true, resizeX: true, resizeY: true, settings: true };\n\t\texports.header = true;\n\n\t\texports.make = function(instance, config, element) {\n\n\t\t\tinstance.refresh = function() {\n\t\t\t\tvar item = config.dataset[0];\n\t\t\t\tif (!item) {\n\t\t\t\t\telement.html('<div class=\"total\">-</div>');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tinstance.dataset(item, function(response) {\n\t\t\t\t\tvar sum = 0;\n\t\t\t\t\tfor (var serie of response || [])\n\t\t\t\t\t\tfor (var point of serie.data)\n\t\t\t\t\t\t\tsum += point.y;\n\t\t\t\t\telement.html('<div class=\"total\">' + sum + '</div>');\n\t\t\t\t});\n\t\t\t};\n\n\t\t\tinstance.service = function(counter) {\n\t\t\t\tif (config.interval && counter % config.interval === 0)\n\t\t\t\t\tinstance.refresh();\n\t\t\t};\n\n\t\t\tinstance.configure = instance.refresh;\n\t\t\tinstance.refresh();\n\t\t};\n\t</script>\n</body>\n```\n\nDrag **Total** onto a dashboard, select its gear icon and choose a report in **Dataset**.\n\n## The settings form\n\nEach element in `<settings>` with a `path` that starts with `?.` edits the key of the same name in the settings of the widget. `exports.config` gives the values of a new widget.\n\n- `<ui-component name=\"dataset\" path=\"?.dataset\" config=\"type:chart;limit:1\">` is the **Dataset** picker. `limit` is the largest number of reports.\n- `<ui-component name=\"input\" path=\"?.interval\" config=\"type:number\">` is a number box. Use `type:checkbox` for a check box.\n\n## Styles\n\nIn `<style>`, write `.CLASS` in front of every selector. Dashboard replaces it with a class of the widget, so your styles do not change other widgets.\n\nEvery key is described in [Widget reference](../widget-api/).\n","entries":[],"license":"Total.js Enterprise","updated":"2026-11-20T06:40:27.732Z"}
{"id":"JaswyI4i861f","url":"https://totaljs.es/docs/dashboard/1-0/development/widget-api/","project":"dashboard","version":"1-0","section":"development","language":"en","title":"Widget reference","summary":"The keys and functions of a widget file, in the server part and in the browser part.","markdown":"---\ntitle: Widget reference\nproject: Dashboard\nversion: 1.0\nsection: development\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/dashboard/1-0/development/widget-api/\nupdated: 2026-11-20T06:52:02.970Z\n---\n\n# Widget reference\n\n> The keys and functions of a widget file, in the server part and in the browser part.\n\nA widget file sets keys on `exports` in two places: in `<script total>` on the server, and in the `<script>` of `<body>` in the browser. See [Custom widgets](../custom-widgets/) for a whole file.\n\nEntries of type **property** are keys you set. Entries of type **event** are functions you define and Dashboard calls. Entries of type **method** are functions that Dashboard gives you.\n\n## API\n\n### exports.name = 'Total';\n\nType: `property`\n\nThe name of the widget in the Widgets window and the first title of a new widget.\n\nSet it in `<script total>`.\n\n### exports.icon = 'ti ti-calculator';\n\nType: `property`\n\nThe icon of the widget in the Widgets window.\n\nA Total.js icon class. Set it in `<script total>`.\n\n### exports.color = '#34A853';\n\nType: `property`\n\nThe colour of the icon in the Widgets window.\n\nSet it in `<script total>`.\n\n### exports.config = { dataset: [], interval: 0 };\n\nType: `property`\n\nThe settings of a new widget.\n\nSet it in `<script total>`. The settings form edits these keys, and `exports.make` receives them as `config`.\n\n### exports.hidden = true;\n\nType: `property`\n\nKeeps the widget out of the Widgets window.\n\nUse it for a file that only adds a [data source](../data-sources/). Set it in `<script total>`.\n\n### exports.install = function(dashboard) {}\n\nType: `event`\n\nRuns on the server when the widget is loaded.\n\n| Parameter | Type | Required | Default | Description |\n| --- | --- | --- | --- | --- |\n| `dashboard` | `Object` | yes |  | The dashboard on the server. See [Data sources](../data-sources/). |\n\nRegister [data sources](../data-sources/) here with `dashboard.source()`.\n\n### exports.uninstall = function(dashboard) {}\n\nType: `event`\n\nRuns on the server before the widget is replaced or removed.\n\n| Parameter | Type | Required | Default | Description |\n| --- | --- | --- | --- | --- |\n| `dashboard` | `Object` | yes |  | The dashboard on the server. |\n\nRemove here what `exports.install` registered, for example with `dashboard.source(name, null)`.\n\n### exports.offset = { lg: { width: 3, height: 2 }, md: { width: 4, height: 3 }, xs: { width: 6, height: 3 } };\n\nType: `property`\n\nThe size of a new widget on the grid, for large, medium and extra small screens.\n\nWidth and height are in cells of the grid. The grid is 12 cells wide. Set it in the browser part.\n\n### exports.actions = { move: true, remove: true, resize: true, resizeX: true, resizeY: true, settings: true };\n\nType: `property`\n\nWhat people may do with the widget on the dashboard.\n\n`move` lets them drag it, `resize`, `resizeX` and `resizeY` let them resize it, `remove` shows the bin icon and `settings` shows the gear icon. Set it in the browser part.\n\n### exports.header = true;\n\nType: `property`\n\nShows the title bar of the widget.\n\nSet it in the browser part.\n\n### exports.import = ['https://cdnjs.cloudflare.com/ajax/libs/apexcharts/3.54.1/apexcharts.min.js'];\n\nType: `property`\n\nScripts and style sheets that the widget needs.\n\nDashboard loads each address once, before it draws the dashboard. Set it in the browser part.\n\n### exports.make = function(instance, config, element) {}\n\nType: `event`\n\nDraws one widget on the dashboard.\n\n| Parameter | Type | Required | Default | Description |\n| --- | --- | --- | --- | --- |\n| `instance` | `Object` | yes |  | The widget on the dashboard. |\n| `config` | `Object` | yes |  | The settings of the widget. |\n| `element` | `jQuery` | yes |  | The element to draw into. |\n\nDashboard calls it for each widget of this type. Define the handlers of `instance` here and draw the first content.\n\n### instance.dataset(item, callback)\n\nType: `method`\n\nLoads the chart data of one entry of the Dataset setting.\n\n| Parameter | Type | Required | Default | Description |\n| --- | --- | --- | --- | --- |\n| `item` | `Object` | yes |  | One entry of `config.dataset`. |\n| `callback` | `Function` | yes |  | `function(response)` with the list of series. |\n\nThe callback receives a list of series. Each series has `id`, `name`, `icon`, `color`, `format`, `decimals` and `data`, a list of points with `x` and `y`. See [Chart data](../../guides/chart-data/).\n\nExample: Load the first report of the settings\n```js\ninstance.dataset(config.dataset[0], function(response) {\n\tfor (var serie of response)\n\t\tconsole.log(serie.name, serie.data.length);\n});\n```\n\n### instance.configure = function() {}\n\nType: `event`\n\nRuns after someone saves the settings of the widget.\n\nReload the data here, because `config` now holds the new settings.\n\n### instance.service = function(counter) {}\n\nType: `event`\n\nRuns every second while the dashboard is open.\n\n| Parameter | Type | Required | Default | Description |\n| --- | --- | --- | --- | --- |\n| `counter` | `Number` | yes |  | The number of seconds since the dashboard opened. |\n\nUse it for a refresh interval: reload when `counter % config.interval === 0`.\n","entries":[{"type":"property","name":"exports.name","signature":"exports.name = 'Total';","since":"","deprecated":false},{"type":"property","name":"exports.icon","signature":"exports.icon = 'ti ti-calculator';","since":"","deprecated":false},{"type":"property","name":"exports.color","signature":"exports.color = '#34A853';","since":"","deprecated":false},{"type":"property","name":"exports.config","signature":"exports.config = { dataset: [], interval: 0 };","since":"","deprecated":false},{"type":"property","name":"exports.hidden","signature":"exports.hidden = true;","since":"","deprecated":false},{"type":"event","name":"exports.install","signature":"exports.install = function(dashboard) {}","since":"","deprecated":false},{"type":"event","name":"exports.uninstall","signature":"exports.uninstall = function(dashboard) {}","since":"","deprecated":false},{"type":"property","name":"exports.offset","signature":"exports.offset = { lg: { width: 3, height: 2 }, md: { width: 4, height: 3 }, xs: { width: 6, height: 3 } };","since":"","deprecated":false},{"type":"property","name":"exports.actions","signature":"exports.actions = { move: true, remove: true, resize: true, resizeX: true, resizeY: true, settings: true };","since":"","deprecated":false},{"type":"property","name":"exports.header","signature":"exports.header = true;","since":"","deprecated":false},{"type":"property","name":"exports.import","signature":"exports.import = ['https://cdnjs.cloudflare.com/ajax/libs/apexcharts/3.54.1/apexcharts.min.js'];","since":"","deprecated":false},{"type":"event","name":"exports.make","signature":"exports.make = function(instance, config, element) {}","since":"","deprecated":false},{"type":"method","name":"instance.dataset","signature":"instance.dataset(item, callback)","since":"","deprecated":false},{"type":"event","name":"instance.configure","signature":"instance.configure = function() {}","since":"","deprecated":false},{"type":"event","name":"instance.service","signature":"instance.service = function(counter) {}","since":"","deprecated":false}],"license":"Total.js Enterprise","updated":"2026-11-20T06:52:02.970Z"}
{"id":"Jaswy84Y861f","url":"https://totaljs.es/docs/dashboard/1-0/development/data-sources/","project":"dashboard","version":"1-0","section":"development","language":"en","title":"Data sources","summary":"Give widgets data from your own code with dashboard.source() on the server.","markdown":"---\ntitle: Data sources\nproject: Dashboard\nversion: 1.0\nsection: development\nlanguage: en\nlicense: Total.js Enterprise\nurl: https://totaljs.es/docs/dashboard/1-0/development/data-sources/\nupdated: 2026-11-20T06:52:02.970Z\n---\n\n# Data sources\n\n> Give widgets data from your own code with dashboard.source() on the server.\n\nReports with chart data are one data source. A widget file can register more in `exports.install`. Their entries then appear in the **Dataset** picker next to the reports, and `instance.dataset()` loads their data.\n\n## An example\n\nThis file, saved as `dashboard/visits.html`, adds the entry **Demo visits** with three fixed points:\n\n```html\n<script total>\n\texports.name = 'Visits source';\n\texports.hidden = true;\n\n\tvar ITEM = { id: 'visits', name: 'Demo visits', icon: 'ti ti-users', color: '#FBBC05' };\n\n\texports.install = function(dashboard) {\n\t\tdashboard.source('visits', {\n\t\t\tsearch: function(model, next) {\n\t\t\t\tnext(model.type === 'chart' ? [ITEM] : []);\n\t\t\t},\n\t\t\tdetail: function(model, next) {\n\t\t\t\tnext(model.id === 'visits' ? ITEM : null);\n\t\t\t},\n\t\t\taction: function(model, next) {\n\t\t\t\tnext([{ id: 'visits', name: 'Demo visits', format: '{0}', decimals: 0, data: [{ x: 'Mon', y: 120 }, { x: 'Tue', y: 150 }, { x: 'Wed', y: 90 }] }]);\n\t\t\t}\n\t\t});\n\t};\n\n\texports.uninstall = function(dashboard) {\n\t\tdashboard.source('visits', null);\n\t};\n</script>\n```\n\nThe built-in widgets ask for the type `chart`, so return your entries for that type.\n\n## API\n\n### dashboard.source(name, options)\n\nType: `method`\n\nRegisters a data source, or removes it when options is null.\n\n| Parameter | Type | Required | Default | Description |\n| --- | --- | --- | --- | --- |\n| `name` | `String` | yes |  | The name of the source. |\n| `options` | `Object` | yes |  | The functions `search`, `detail` and `action`, or `null` to remove the source. |\n\nCall it in `exports.install` of a widget file. The name must be unique and must not contain `~`.\n\n### search: function(model, next) {}\n\nType: `event`\n\nReturns the entries that the Dataset picker offers.\n\n| Parameter | Type | Required | Default | Description |\n| --- | --- | --- | --- | --- |\n| `model.search` | `String` | no |  | The text typed in the picker. It can be empty. |\n| `model.type` | `String` | yes |  | The type the widget asks for, for example `chart`. |\n| `model.user` | `Object` | yes |  | The signed-in user. Return only the entries this user may see. |\n| `next` | `Function` | yes |  | `next(list)` returns the entries. |\n\nReturn a list of objects with `id`, `name`, `icon` and `color`.\n\n### detail: function(model, next) {}\n\nType: `event`\n\nReturns the name, icon and colour of one entry.\n\n| Parameter | Type | Required | Default | Description |\n| --- | --- | --- | --- | --- |\n| `model.id` | `String` | yes |  | The id of the entry. |\n| `model.type` | `String` | yes |  | The type the widget asks for. |\n| `model.user` | `Object` | yes |  | The signed-in user. |\n| `next` | `Function` | yes |  | `next(object)` returns the entry. |\n\nDashboard calls it when the settings of a widget open. Return `null` for an entry that no longer exists; it is taken off the Dataset.\n\n### action: function(model, next) {}\n\nType: `event`\n\nReturns the data of one entry.\n\n| Parameter | Type | Required | Default | Description |\n| --- | --- | --- | --- | --- |\n| `model.id` | `String` | yes |  | The id of the entry. |\n| `model.type` | `String` | yes |  | The type the widget asks for. |\n| `model.user` | `Object` | yes |  | The signed-in user. |\n| `model.query` | `Object` | yes |  | The query arguments of the request. |\n| `next` | `Function` | yes |  | `next(data)` returns the data. |\n\nFor the type `chart`, return a list of series. Each series has `id`, `name`, `icon`, `color`, `format`, `decimals` and `data`, a list of points with `x` and `y`.\n","entries":[{"type":"method","name":"dashboard.source","signature":"dashboard.source(name, options)","since":"","deprecated":false},{"type":"event","name":"options.search","signature":"search: function(model, next) {}","since":"","deprecated":false},{"type":"event","name":"options.detail","signature":"detail: function(model, next) {}","since":"","deprecated":false},{"type":"event","name":"options.action","signature":"action: function(model, next) {}","since":"","deprecated":false}],"license":"Total.js Enterprise","updated":"2026-11-20T06:52:02.970Z"}
