Chart
The chart compares the current values of several tags or shows how one quantity depends on another. “View” chooses how:
- Columns and Bars compare values side by side: flow per line, equipment load, tank levels. The scale runs from “Minimum” to “Maximum” (0 means up to the largest value). Numbers on the columns use “Format” and “Units”.
- Pie and Donut show shares of a total: energy use per area, output per shift. The donut shows the total in the center. The legend on the right gives the value and the share.
- XY chart shows the operating point. X and Y are two tags, such as pump flow and head, or temperature and pressure.
- The latest points stay as a faint trail (“Trail points”).
- The “Reference curve” is the datasheet characteristic as
x,ypoints, so you can see where the equipment runs relative to it.
Values are set as “label=tag” pairs: Line 1=Line1.Flow; Line 2=Line2.Flow. Colors come in order from “Colors” or from a calm palette without red and yellow, which are kept for alarms. A value without a tag connection is not drawn as zero: its column becomes a dashed line and the legend shows a dash.
The chart looks the same in the operator client and in the browser. For values over time, use the trend.
Properties
Section titled “Properties”Besides the properties of every element — name, position, size, tooltip, rotation, transparency and the operate right:
| Property | Values | Default | Description |
|---|---|---|---|
Kind |
Column, Bar, Pie, Donut, XY |
Column |
View. Columns, bars, pie, donut or XY chart |
Title |
text | Title | |
Series |
text | Линия 1=; Линия 2=; Линия 3= |
Values. “label=tag” pairs separated by “;”: Line 1=Line1.Flow; Line 2=Line2.Flow. For columns, bars and pie |
Colors |
text | Colors. Value colors in order separated by “;”; empty — the standard ones | |
ShowValues |
true / false |
true |
Show values. Numbers on columns, bars and slices |
Format |
text | 0.# |
Format |
Unit |
text | Units. Label for values and the scale | |
Minimum |
number | 0 |
Minimum. Start of the column and bar scale (and Y of the XY chart) |
Maximum |
number | 0 |
Maximum. End of the scale; 0 — by the largest value |
XTag |
tag name | X tag | |
YTag |
tag name | Y tag | |
XMinimum |
number | 0 |
X from |
XMaximum |
number | 0 |
X to. 0 — from the points |
XTitle |
text | X label | |
YTitle |
text | Y label | |
TrailPoints |
integer | 60 |
Trail points. How many recent operating points to show; 1 — only the current one |
Curve |
text | Reference curve. “x,y” points separated by “;”: 0,45; 50,42; 100,35 — the reference curve (datasheet characteristic) | |
PointColor |
#RRGGBB |
#2F6FB0 |
Point color |
CurveColor |
#RRGGBB |
#9AA3AB |
Curve color |
Background |
#RRGGBB |
#FFFFFF |
Background. Empty — transparent |
Foreground |
#RRGGBB |
#1E2328 |
Text color |
FontSize |
number | 12 |
Font size |
From scripts
Section titled “From scripts”Item.Type = Chart. Any property is read and changed by name: Item.PointColor = "#D32F2F". The common element members (Visible, Enabled, Value, Raise, Apply…) are described in Elements from scripts.
Actions of this element:
| Member | Description |
|---|---|
Values() |
Values — Label, Tag, Value |
Points() |
XY chart trail — X and Y, oldest points first |
ClearPoints() |
Clear the XY chart trail |
Events
Section titled “Events”Mouse, hover, focus and keyboard — as for any element (see Events and functions).
Examples
Section titled “Examples”The busiest line.
var top = Screen.Items("Flow").Values() .filter(function (v) { return v.Value != null; }) .sort(function (a, b) { return b.Value - a.Value; })[0];HMI.ShowMessage("Highest: " + top.Label + " — " + top.Value);Start the operating point trail again, for example after a pump start.
Screen.Items("Pump P-101").ClearPoints();Reference curve from a script, for a different impeller.
Screen.Items("Pump P-101").Curve = "0,46; 40,43; 80,34; 110,20";