Skip to main content
Version: 1.0.8

HMI Trend

A high-performance-HMI embedded trend: the Y-axis is the operating range, a band shows the desired range, dashed lines mark the alarm limits, and the trace stays neutral until it leaves the desired band. An operator reads deviation at a glance without reading numbers.

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

Reach for it when you need:

  • The trend beside a controlled value on a process screen
  • Any place where "is this normal?" matters more than "what is the value?"

Component name: HmiTrendChart · Category: Chart

In the palette: HP HMI embedded trend: operating-range Y-axis, desired-range band + dashed alarm limits, neutral line that colours only on excursion

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, pulls the trailing window of history; leave empty to use the bound data.
windowenum3600Trailing time window of history to draw (only used when tagPath is set). Options: 300 · 900 · 3600 · 21600 · 43200 · 86400.
dataany—Fallback series values when no tagPath is bound — bind to a named query, or leave blank for the sample trend. Auto-decimated to the widget width.
yMinnumber""Fixed Y minimum (blank = auto operating-range).
yMaxnumber""Fixed Y maximum (blank = auto operating-range).
desiredLonumber73Bottom of the desired-range back-band.
desiredHinumber77—
loAlarmnumber72Low alarm (L) — dashed warn line.
hiAlarmnumber78—
loloAlarmnumber71Low-low alarm (LL) — dashed crit line.
hihiAlarmnumber79—
unitstring%—
lineColorcolor#3d6fa5Trend line — a muted, neutral blue (HP HMI: never a bright/alarm hue; emphasis is by thickness, not colour). Colours to warn/crit only on excursion.
lineWidthnumber1.75—
warnColorcolor#f57c00—
critColorcolor#d32f2f—
bandColorcolor#b8daffDesired-range back-band — solid pale blue, SHARED with the MAI/Sparkline (green is reserved: it conditions "all clear").
showBandbooleantrue—
showLimitLinesbooleantrue—
showGridbooleantrue—
gridColsnumber4Interior vertical time divisions.
showScalebooleantrueShow the Y-axis min / max labels.
scaleFontSizenumber10—
decimalsnumber1Fraction digits shown. 1.0.4
scaleColorcolorvar(--widget-label)—
strokeColorcolorcurrentColorAxis frame + gridline colour. Default currentColor matches the drawn SVG line colour (light + dark).
showWindowLabelbooleantrueShow the trailing-window label (e.g. "12 h"). Tag-history mode only.
windowLabelColorcolorvar(--widget-label)—
windowLabelSizenumber13—
labelstringTrend—
enableLabelbooleantrue—
labelColorcolorvar(--widget-label)—
labelSizenumber11—
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.
dataClickData clickChartcontext.point — the clicked data point.
dataDblClickData double clickChartcontext.point — the clicked data point.
legendSelectLegend toggleChartThe toggled series.
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​

The neutral-until-excursion colouring is the point of this component. Do not override it to colour by series — that reintroduces exactly the visual noise the HP HMI convention removes.

The readout beside the trace shows one decimal place by default; decimals (0–6) sets how many. It formats through the same helper as the Gauge, the Tank and the Moving Analog Indicator, so a screen showing one tag in several of them cannot show it to different precision in each.

What the trace draws. Changed in 1.0.8 The trend now draws against real time: each sample sits at its timestamp on the window, so sparse booleans, holes and the live edge keep a true time scale. History is fetched as M4 with one slot per pixel column of the widget, so a one-sample spike survives at any width and a small widget no longer fetches points it cannot show. Booleans, and integers whose tag is set to step, are held flat until they change; the line breaks only where samples are further apart than a few logging intervals. Strokes sit at the samples' own times, with no stair-steps. Quality is shown: stretches where the tag was not Good are shaded, including a window that was Bad throughout, which used to draw nothing at all. A Bad reading breaks the live edge instead of drawing a dip. The forming slot — the newest data, not yet closed into a slot — is drawn as a dashed segment from the last closed one, so the right edge is never up to a whole slot behind. A bound data array is unaffected: it still draws by index.

Many trends on one screen. Changed in 1.0.8 HMI trends and sparklines that mount together on one window share a single historian request (up to 32 tags each), instead of one request per widget. A trend in a background browser tab still loads its history.

See also​