Trend is one of three time-series components. smart-strip-chart is for data acquisition at high sample rates, smart-scope is for triggered captures, and Trend is for process data at around one sample per second over hours. History is supplied by the application: the trend keeps the data it has been given and raises the historyRequest event when it is panned to a time range it has no samples for. Smart.Industrial.Connect.trend answers the request from a data session and pushes live samples as they arrive.
Drag the plot to the left to request the earlier hours from the session; the simulator returns the same signals evaluated in the past. Use the mouse wheel to zoom around the pointer, click to place a cursor, and double-click or press L to return to live mode. Each pen is drawn as a percentage of its own range, so a pressure in bar and a speed in RPM share one plot, and the readout shows the engineering values.
Keyboard: the pens panel is a single tab stop. Use the arrow keys to move between pens and Enter or Space to show or hide one. The plot can also be focused: the left and right arrow keys move the cursor, plus and minus zoom, L returns to live mode and Escape clears the cursor.
The band is a model's expected value with its 95% confidence interval for the temperature pen, scaled against the pen's own range. The markers are the anomalies flagged by the model: an instant on the flow pen, an interval on the temperature pen, and one that is not attached to a pen. The model in this demo is a running mean and its spread computed in the page; in an application the values come from the model in use, and the trend draws what it is given.
The markerClick event is where the operator's feedback starts. This page records a true or false positive next to the marker, which can be used to train the next model.