# Build a dashboard

> Build a dashboard from the new cards - add a card from the card picker, give it queries, set its display, thresholds and overrides, add variables and a default time range, and convert the cards of earlier releases.

Product: eaxScada · Type: How-to guide · Editions: Starter, Pro, Enterprise
Source: https://eaxware.com/docs/eaxscada/how-to/build-a-dashboard/
Verified against commit 07a64f6.

## Goal

A line dashboard shows the last 8 hours of one line: its trends, its machine states, its current values and its alarms. A **line** variable switches the whole dashboard to another line.

Every edition has every card. The [Dashboard cards](/docs/eaxscada/reference/dashboard-cards/) reference lists what each card shows.

## 1. Add a card

1. Open **Dashboards** and the dashboard ([Manage dashboards](/docs/eaxscada/how-to/manage-dashboards/)), then **Edit Layout**.
2. Click **Add card**, or click an empty cell of the grid. The card picker opens.
3. Pick a card. The groups are:
   - **Time**: Time series, State timeline.
   - **Values**: Stat, Gauge, Bar gauge.
   - **Records**: Table, Alarm list, Bar / pie, Pareto, Text.
   - **Custom**: Custom chart.
   - **Classic**: the cards of earlier releases. They keep working.

   Type in the search box to filter; arrows and Enter pick a card. Each card says what data it needs.

The new cards are also in the palette, under **New cards**.

A new card is placed but not set up. It shows that it has no query, never invented values.

## 2. Give it queries

Double-click the card (or select it and press Enter) to open its settings. The panel shows a live preview with **Chart | Values** tabs: **Values** lists the query result in the data grid. The preview redraws a moment after each edit.

In the **Query** tab:

1. Choose the **Source**: current values, history (raw or aggregated), value changes, active alarms, the alarm journal, alarm counts, OEE and downtime (Pro) or an Analytics dataset (Pro).
2. Add the **Tags**: type a path and press Enter, or **Browse tags**. Name each tag exactly (no `*` or `?`), at most 50 per query. **Insert a variable** adds `${line}`.
3. For aggregated history, choose the **Aggregates** (average, minimum, maximum...) and the **Bucket** (automatic from the card width by default).
4. **Add a query** for another series: queries A to H, at most 8.
5. Optional: give the card its own range (**Card time range**) or a **Time shift** ("1 day earlier", to compare with yesterday). The card then shows its range in its header.

Errors show under the field: a missing tag, a wildcard, too many tags, a tag you may not read.

## 3. Set its display

- **Display**: the card's own options, such as the style, the axes and the legend of a time series, or the kind of a gauge.
- **Thresholds**: steps of colour from a base value, absolute or in percent of min..max. **Colours only: alarms are set in Alarms.** On a time series, stat, gauge or bar gauge, tick **Show alarm limits** to show the tags' own alarm limits (HH, H, L, LL and the deviation limits; equal / not equal as a line on the time series): solid labelled lines on a time series, and in place of the threshold steps for that tag on a stat, gauge or bar gauge. They are read-only, read with each viewer's rights: a viewer who may not read one of the card's tags sees no limit on that card. To change a limit, change the alarm in **Alarms**. Limit lines are always in view. On an axis with a fixed min or max, a limit beyond it is named at the edge ("↑ HH 9.5 off scale"). A gauge keeps its scale and marks such a limit at the end of its arc or bar. A bar gauge marks it with a triangle at the end of the bar. [Show alarm limits](/docs/eaxscada/reference/dashboard-cards/#show-alarm-limits) **Value mappings** turn a value, a range or a text pattern into a text and a colour.
- **Overrides**: settings for one series (a tag path or a field such as `A:avg`): its name, colour or axis.

Click **Apply** to write the card. One Apply is one undo step. Then save the dashboard as usual.

## 4. Add a variable and a default time range

1. Click **Dashboard settings** in the toolbar.
2. Set the **Default time range**, for example From `now-8h`, To `now`, and the **Refresh**.
3. **Add a variable**: name `line`, type **Children of a tag folder**, folder `Plant`. The folders under `Plant` that the viewer may read become its choices.
4. Use `${line}` in the cards' tag paths, for example `Plant/${line}/Speed`.

The toolbar above the dashboard now has the time range, the refresh and a **line** list, in the Studio and in the operator runtime. Operators pick a line there. The page address keeps the choice (`?from=now-8h&to=now&var-line=L2`), so a shared link opens the same view. Only one of the variable's choices is accepted: any other value is refused.

**Shifts (Pro, Enterprise).** When the server has shift calendars (`reports.shifts`), the time picker also offers **This shift** (its start to now, live) and **Previous shift**, from the calendar `default` (else the first). They match the report schedules and the shift log, which use the same calendars. For a shift choice, add a variable of type **Shift**: choose its **Shift calendar** (empty: `default`) and, optionally, a **Default shift** (empty: the current one). Its choices are the calendar's shifts, the current one first and marked "(now)"; `${shift}` is the shift's name, for example in a dataset parameter or a title. Without a shift calendar the shift ranges are not shown and a shift variable has no choice.

A variable never reaches a command card, an interlock, a confirmation or a screen. The server refuses such a save. [Time range, refresh and variables](/docs/eaxscada/reference/dashboard-cards/#time-range-refresh-and-variables)

## 5. Convert an earlier card

The trend, KPI, sparkline, radial gauge, gauge and alarm summary cards of earlier releases can become new cards:

1. Open the earlier card's settings and click **Convert to new card**.
2. The dialog names the new card and lists what is not carried over (for example a fixed value, a target or the bands taken from the alarm limits).
3. Click **Convert**. Ctrl+Z undoes it.

Nothing is converted automatically: earlier cards keep working as they are until you convert them.

## When a save is refused

| Message | What to do |
|---|---|
| **Reload to edit this dashboard**: it was saved by a newer Studio | reload the page, then edit it again |
| **Dashboard code right needed** | a custom chart script needs the `dashboards.code` right: ask an administrator, or undo the code change |
| a variable is in a command, interlock, confirmation or screen field | name that field literally |

See also [What the server refuses](/docs/eaxscada/how-to/manage-dashboards/#what-the-server-refuses).

## Related

- [Dashboard cards](/docs/eaxscada/reference/dashboard-cards/)
- [Custom chart](/docs/eaxscada/reference/custom-chart/)
- [Manage dashboards](/docs/eaxscada/how-to/manage-dashboards/)
