doc/help/Widget-Reference.md
Serial Studio has 15+ widget types for real-time data visualization. Widgets fall into two categories: group widgets (display multiple datasets from a group) and dataset widgets (display a single dataset value).
The diagram below shows all widget types organized by category, with their configuration keys and dataset requirements.
flowchart TD
Root(["Dashboard Widgets"])
Root --> Group["Group Widgets"]
Root --> Dataset["Dataset Widgets"]
Group --> G1["Data Grid · MultiPlot
Accelerometer · Gyroscope"]
Group --> G2["GPS Map · LED Panel
3D Plot · Image View"]
Group --> G3["Painter (user-scripted)
Web View"]
Dataset --> D1["Plot · FFT Plot · Waterfall
Bar · Gauge · Compass · Meter"]
Root --> Utility["Utility Widgets"]
Utility --> U1["Clock · Stopwatch"]
"datagrid"."multiplot".graph: true to the group."gps" (also accepts "map")."gyro" (also accepts "gyroscope")."accelerometer".led: true).label next to the dataset title, and flashes while a band marked blink is active. Outside every band, the LED is off (annunciator-panel behavior).ledHigh (default 80).led: true on each dataset, then either define alarmBands (see Alarm bands) or set ledHigh."plot3d"."image".imgDetectionMode: "autodetect" (default, uses format magic bytes) or "manual" (user-defined delimiters).imgStartSequence: hex start delimiter (manual mode only).imgEndSequence: hex end delimiter (manual mode only)."painter".paint(ctx, w, h) callback (and an optional onFrame() callback) that renders directly into the widget's bitmap on every dashboard tick.datasets global and dashboard tick metadata through frame.number / frame.timestampMs."webview".webViewUrl: the address to load.graph: true (field name plt).plotMin and plotMax project-file keys (C++ fields pltMin/pltMax).xAxis project-file key (C++ field xAxisId), which enables XY/scatter plots.fft: true.fftMin and fftMax.fftSamples (window size), fftSamplingRate (Hz), fftMin, fftMax.waterfall: true.fftSamples, fftSamplingRate, fftMin, fftMax). Enable both fft: true and waterfall: true if you want the FFT plot alongside the waterfall.minDb / maxDb) is adjustable from the widget toolbar.waterfallYAxis to another dataset's uniqueId to drive the Y axis from that dataset's value instead. This is typically used for order-tracking plots (for example RPM vs. frequency).waterfall: true, waterfallYAxis (0 = time; otherwise the uniqueId of the dataset to use as the Y axis), plus the FFT fields above."bar".widgetMin (default 0), widgetMax (default 0), alarmBands (array; see Alarm bands). The widgetMin/widgetMax keys map to the C++ fields wgtMin/wgtMax."gauge".widgetMin, widgetMax, alarmBands. The widgetMin/widgetMax keys map to the C++ fields wgtMin/wgtMax."compass"."meter".widgetMin (default 0), widgetMax (default 0), alarmBands. The widgetMin/widgetMax keys map to the C++ fields wgtMin/wgtMax.Bar, Gauge, Meter, and LED Panel widgets render one or more alarm bands. Each band is a contiguous value range with a color and a severity tier. The gauge paints them as colored stripes (Bar) or arc segments (Gauge / Meter), and the needle / fill tints to the active band's color when the value enters it; LED Panel entries light in the active band's color. The "APU tachometer" convention (white below normal, green operating range, yellow caution, red redline) is one canonical setup; any combination of ranges and colors is allowed.
Band schema. Under the dataset's alarmBands array, each entry is an object:
| Field | Type | Required | Notes |
|---|---|---|---|
min | double | yes | Lower bound of the band (inclusive). |
max | double | yes | Upper bound of the band (exclusive at top of range). |
severity | int | yes | 0 = Info, 1 = OK, 2 = Warning, 3 = Critical. Drives the default color and whether the band raises a notification on entry. |
color | string | no | Hex override ("#rrggbb"). When empty, the severity's theme color is used (theme switches re-tint live). |
label | string | no | Optional human-readable name. Surfaces in the band-edge notification subtitle and next to the dataset title on LED panels. |
blink | bool | no | When true, LED panels flash the LED while the value sits in this band. Defaults to false. |
Bands may have gaps (the dataset's default background shows through), may overlap (later bands paint over earlier ones), and need not cover the full range. Editing is via the Alarm Bands button in the dataset toolbar (next to Transform), which opens a dedicated dialog with presets (Tachometer, Speedometer, Engine Temperature, Pressure, Battery Voltage, Fuel Level, Signal Strength, CPU / System Load, OK / Warning / Critical, Indicator, Fault Indicator), per-band color picker, severity selector, blink toggle, and a live preview strip.
Notifications. When the value enters a band with severity ≥ Warning, Serial Studio posts a notification (Warning or Critical level, with the band's label in the subtitle). Alarm tracking runs per dataset at the dashboard level, so notifications fire even when the widget displaying the dataset is hidden or not instantiated. A 3-second per-dataset cooldown suppresses oscillation spam.
Legacy compatibility. Project files written by older Serial Studio releases carry alarmEnabled / alarmLow / alarmHigh instead of alarmBands. On load, those are converted to two Warning-severity bands ([wgtMin..alarmLow] and [alarmHigh..wgtMax]). The legacy keys are not written back; re-saved projects carry only alarmBands. For painter scripts (Pro), dataset.alarmLow and dataset.alarmHigh remain readable as derived values (first / last Warning+ band edges) so existing scripts keep working.
Clock and Stopwatch are dashboard-level utility widgets. They are not attached to any group or dataset; toggle them from the Start menu (Dashboard pane) and they appear as overview entries in the taskbar alongside Terminal and Notifications. Enabled state persists in QSettings under Dashboard/ClockEnabled and Dashboard/StopwatchEnabled.
QSettings (ClockWidget/clockPageIndex).HH:MM:SS.mmm readout, Start/Stop, Lap, Reset buttons, and a scrollable lap table.| Widget | Type | Key | Min datasets | Key settings |
|---|---|---|---|---|
| Data Grid | Group | datagrid | 1+ | (none) |
| MultiPlot | Group | multiplot | 1+ | graph: true on datasets |
| GPS Map | Group | gps | 2-3 | lat, lon, (alt) datasets |
| Gyroscope | Group | gyro | 3 | yaw, pitch, roll |
| Accelerometer | Group | accelerometer | 3 | x, y, z accel |
| LED Panel | Group | auto | 1+ | led: true, alarmBands[] or legacy ledHigh |
| 3D Plot | Group | plot3d | 3 | x, y, z coords (Pro) |
| Image View | Group | image | 0 | binary stream (Pro) |
| Painter | Group | painter | 0+ | user paint(ctx, w, h) JS script (Pro) |
| Web View | Group | webview | 0 | webViewUrl (Qt WebEngine build) |
| Plot | Dataset | auto | n/a | graph: true, plotMin/plotMax |
| FFT Plot | Dataset | auto | n/a | fft: true, fftSamples, fftSamplingRate |
| Waterfall | Dataset | auto | n/a | waterfall: true, FFT fields, waterfallYAxis (Pro) |
| Bar | Dataset | bar | n/a | widgetMin/widgetMax, alarmBands[], swipe to digital page |
| Gauge | Dataset | gauge | n/a | widgetMin/widgetMax, alarmBands[], swipe to digital page |
| Compass | Dataset | compass | n/a | value 0-360, swipe to digital page |
| Meter | Dataset | meter | n/a | widgetMin/widgetMax, alarmBands[], swipe to digital page |
| Clock | Utility | (toggle) | 0 | system-clock driven; swipe between analog face / digital readout |
| Stopwatch | Utility | (toggle) | 0 | local Start/Stop/Lap/Reset with lap table |
Every dataset in a project file supports these visualization-related fields:
| Field | Type | Default | Description |
|---|---|---|---|
index | int | 0 | Frame offset index (column position in CSV data). |
title | string | (none) | Human-readable display name. |
units | string | (none) | Measurement units (for example "m/s", "degC"). |
widget | string | "" | Dataset widget type: "bar", "gauge", "compass", or "meter". |
plt (graph) | bool | false | Enable time-series plot. |
fft | bool | false | Enable FFT spectrum plot. |
waterfall | bool | false | Enable waterfall (spectrogram) plot. Pro. |
waterfallYAxis | int | 0 | Waterfall Y-axis source: 0 = time, otherwise the uniqueId of another dataset (order tracking). |
led | bool | false | Enable LED indicator. |
log | bool | false | Enable logging to file. |
overviewDisplay | bool | false | Show in the overview/status bar. |
plotMin | double | 0 | Plot Y-axis minimum (0 = auto-scale). C++ field pltMin. |
plotMax | double | 0 | Plot Y-axis maximum (0 = auto-scale). C++ field pltMax. |
widgetMin | double | 0 | Widget (bar/gauge/meter) minimum. C++ field wgtMin. |
widgetMax | double | 0 | Widget (bar/gauge/meter) maximum. C++ field wgtMax. |
ledHigh | double | 80 | LED activation threshold (used only when alarmBands is empty). |
alarmBands | array | [] | Colored value bands for bar/gauge/meter widgets and LED panels. Each entry: {min, max, severity, color?, label?, blink?}; see Alarm bands. Legacy alarmEnabled / alarmLow / alarmHigh keys from older releases are still read and migrated to bands on load, but no longer written. |
fftSamples | int | 256 | FFT window size (power of 2, 8 to 16384). |
fftSamplingRate | int | 100 | FFT sampling rate in Hz. |
fftMin | double | 0 | FFT frequency axis minimum. |
fftMax | double | 0 | FFT frequency axis maximum. |
xAxis | int | -2 | X-axis source: -2 = time (default), or the uniqueId of another dataset for an XY plot (Pro). C++ field xAxisId. |
widgetSettings and persist between sessions.DashboardWidget enum: Terminal, DataGrid, MultiPlot, Accelerometer, Gyroscope, GPS, Plot3D, FFT, LED, Plot, Bar, Gauge, Compass, Meter, Clock, Stopwatch, Web View, ImageView, OutputPanel, NotificationLog, Waterfall, Painter.Most widgets carry a small toolbar of icon buttons along their top edge that appears once the widget is large enough to fit it. Every button on every widget toolbar is listed in the Toolbar & Button Reference.
| Data type | Recommended widget |
|---|---|
| Temperature | Gauge, Plot, or Bar |
| Pressure, voltage, signal level | Plot, Gauge, Meter, or Bar |
| GPS coordinates | GPS Map (group) |
| Acceleration (X, Y, Z) | Accelerometer (group) |
| Rotation (X, Y, Z) | Gyroscope (group) |
| Heading or bearing | Compass |
| Audio or vibration frequency | FFT Plot |
| Time-frequency / spectrogram | Waterfall (Pro) |
| Boolean status flags | LED Panel (group) |
| Mixed numeric and text values | Data Grid (group) |
| 3D trajectory or position | 3D Plot (group, Pro) |
| Live camera or image stream | Image View (group, Pro) |
| Embedded web page / map / 3D model | Web View (group) |
| Wall-clock time / session timestamp | Clock (utility) |
| Manual elapsed-time / lap timing | Stopwatch (utility) |