Skip to content

Commit 959ac46

Browse files
authored
Merge pull request #1859 from colinl/1856_gauge_segments_docs
Correct and improve help text for ui-gauge
2 parents 5aff7cd + 3a66db5 commit 959ac46

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

nodes/widgets/locales/en-US/ui_gauge.html

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
<script type="text/html" data-help-name="ui-gauge">
33
<h3>Properties</h3>
44
<dl class="message-properties">
5-
<dt>Type <span class="property-type">half | 3/4</span></dt>
6-
<dd>Defines the shape of the gauge, <i>"Tile"</i>, <i>"Battery"</i>, <i>"Water Tank"</i>, <i>"Half Gauge"</i> or <i>"3/4 Gauge"</i>.</dd>
5+
<dt>Type <span class="property-type">see detail</span></dt>
6+
<dd>Defines the type and shape of the gauge, <i>"Tile"</i>, <i>"Battery"</i>, <i>"Water Tank"</i>, <i>"Half Gauge"</i> or <i>"3/4 Gauge"</i>.</dd>
77
<dt>Style <span class="property-type">rounded | needle</span></dt>
8-
<dd>Defines the style of arc rendered, "Needle" or "Rounded". Not available for "Tile".</dd>
8+
<dd>Defines the style of arc rendered, "Needle" or "Rounded". Only available for "Half Gauge" and "3/4 Gauge".</dd>
99
<dt>Range <span class="property-type">number</span></dt>
1010
<dd>The smallest and largest values that can be rendered on the gauge</dd>
1111
<dt>Segments <span class="property-type">list</span></dt>
12-
<dd>Collection of objects that define the relevant color for a given value</dd>
12+
<dd>Collection of objects that define the relevant color for a given value, and the overlay text source for Tile gauges.</dd>
1313
<dt>Label <span class="property-type">list</span></dt>
1414
<dd>The label text shown above the gauge</dd>
1515
<dt>Value <span class="property-type">typed input</span></dt>
@@ -46,9 +46,14 @@ <h3>Dynamic Properties (Inputs)</h3>
4646
<dd>Update the label rendered above the Gauge</dd>
4747
<dt class="optional">segments <span class="property-type">array</span></dt>
4848
<dd>
49-
Change the options available in the dropdown at runtime
49+
Pass in an array of objects, each containing properties <code>color</code> and <code>from</code> to update the segments settings.
50+
The entries in the array must be in increasing order of <code>from</code>.
51+
In addition the overlay specification for Tile gauges may be updated by including properties <code>textType</code> and <code>text</code>.
52+
<code>textType</code> can be one of <i>label</i>, <i>value</i>, <i>str</i>, <i>env</i> or <i>none</i>.
53+
For <i>str</i> and <i>env</i>, <code>text</code> should be the required text or environment variable name, otherwise it should be an empty string.
54+
<code>textType</code> and <code>text</code> may be omitted if not required.
5055
<ul>
51-
<li><code>Array&lt;{color: String, from: Number}&gt;</code></li>
56+
<li><code>Array&lt;{color: String, from: Number, textType: String, text: String}&gt;</code></li>
5257
</ul>
5358
</dd>
5459
<dt class="optional">gtype <span class="property-type">see detail</span></dt>

0 commit comments

Comments
 (0)