A linear style gauge for Node-RED Dashboard 2.0.
The usual method of installing is to use Manage Palette in the node red editor and search for @hotnipi/node-red-dashboard-2-ui-edgewise-meter and install it.
Using npm
directly, cd
into your node red user directory (usually .node-red in your home folder) and from there run
npm install @hotnipi/node-red-dashboard-2-ui-edgewise-meter
Pass the value in msg.payload
. This may be a Number or a string that represents a number.
Certain configuration values can be overridden dynamically be passing in an object in msg.ui_update
. See Dynamic Properties below.
Certain properties can be overridden by passing an object in msg.ui_update
. The name of the item in msg.ui_update
is generally the name of the propety being overridden. For example, the Sectors definitions may be changed by passing in array in msg.ui_update.sectors
.
msg.ui_update.label
is present and contains a string then that string will be displayed in the label field in the gauge.msg.ui_update.min
is present and contains a number then min limit of the gauge will be changed.msg.ui_update.max
is present and contains a number then max limit of the gauge will be changed.msg.ui_update.count
is present and contains a number then count of the digits of the gauge will be changed. The display recalculates positions so you may need to change also the Min or Max to get correct results msg.ui_update.displaysize
is present and contains a number then display size will be changed.msg.ui_update.sectors
contains an array then that will be used to override the current sector data. The array must contain properties containing the sector start value and the colour. It must be in order of increasing start value. For example, the array might consist of
[{ "start": 0, "color": "green"}, { "start": 5, "color": "skyblue"}]
Display elements my be overriden in the normal way using a ui-template node. In particular:
The color of the digits
.myclass .hotnipi-ewm-num{
color:red !important ;
}