Skip to main content
Version: 1.0.4

HMI Sparkline

A small inline trend with an optional desired-range band, light enough to repeat many times on one view — one beside every value in a table of forty tags.

The HMI Sparkline component as it renders with its default settings.The HMI Sparkline component as it renders with its default settings.

Reach for it when you need:

  • A trend beside each row of an equipment list
  • Recent context next to a numeric readout, where a full chart would not fit

Component name: HmiSparkline · Category: Chart

In the palette: Lightweight inline trend with an optional desired-range band; light enough to repeat many times per view

Properties

Any property can be bound to a tag, another component's property, or a query.

PropertyTypeDefaultDescription
tagPathtag""Historized tag to trend — pick from the selector (history-enabled tags only). When set, the sparkline pulls the trailing window of that tag's history (blank until it resolves); leave empty to use the bound data instead.
windowenum300Trailing time window of history to draw (only used when tagPath is set). Options: 60 · 300 · 900 · 3600 · 21600 · 86400.
dataanyFallback series values when no tagPath is bound — bind to a named query, or leave blank for the sample trend. Auto-decimated (min/max) to the widget width.
showWindowLabelbooleantrueShow the trailing-window label (e.g. "5 min") in the corner. Tag-history mode only.
windowLabelColorcolorvar(--widget-label)
windowLabelSizenumber12
desiredLonumber35Bottom of the desired-range back-band (blank = no band).
desiredHinumber65
yMinnumber""Fixed Y minimum (blank = auto-range).
yMaxnumber""Fixed Y maximum (blank = auto-range).
lineColorcolor#64748b
lineWidthnumber1.5
bandColorcolor#b8daffDesired-range back-band colour — a solid pale blue, SHARED with the MAI desired band (green is reserved — it conditions "all clear").
showDotbooleantrue
dotColorcolorvar(--widget-value)
alarmColorcolor#f57c00Dot colour when the last value leaves the desired band.
stylestyle{}Custom CSS properties

Events

Attach event actions to these in the Event Manager.

EventLabelGroupPayload
clickClickMouseThe DOM event.
dblclickDouble clickMouseThe DOM event.
contextmenuRight clickMouseThe DOM event.
mouseenterMouse enterMouseThe DOM event.
mouseleaveMouse leaveMouseThe DOM event.
Right-click behaves differently in the Designer

contextmenu fires your configured actions at runtime only — in LiveView and in preview. On the Designer canvas the right-click is captured to open the Event Manager, so testing it there will not run your actions. Test right-click in preview.

Notes

Choose this over Sparkline when you need many instances on one screen; choose Sparkline when you need its bar or area variants on a handful.