> For the complete documentation index, see [llms.txt](https://help.qtech.co.nz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.qtech.co.nz/datran/datran-vi-scada/datranvue/segmented-gauge.md).

# Add a segmented gauge

Add a segmented gauge to a DATRANVue screen, and set its segments, labels, value display and colours.

The Segmented Gauge GUI element, added to DATRANVue in version 3.17, is for water usage display. The Gauge supports up to 10 segments.

![A segmented gauge in DATRANVue Designer, showing water usage](https://3621580088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa5hMAUl7E1cWeN5Rghg0%2Fuploads%2FWls0PDAn9OCTYV1KwFik%2Fvue-segmented-gauge.png?alt=media)

{% hint style="info" %}
**Applies to:** DATRANVue Designer and Runtime must be installed (version 3.17 or greater required). DATRAN must be installed (version 6.74 or later recommended).
{% endhint %}

## Add the gauge

1. Open DATRANVue Designer (open the start menu, type "DATRANVue Designer", press enter).
2. Create a new form (**File -> New**).
3. Scroll to the bottom of the **Water** Toolbox submenu, and locate the **Segmented Gauge** element.
4. Drag an instance of the Segmented Gauge from the menu onto the canvas.

You now have a Segmented Gauge instance with default settings.

## Properties

### Layout

The Layout submenu contains two properties: **Width** and **Height**. These can be set directly through the menu to resize the Gauge, or you can resize the Gauge using the drag arrows on the Gauge’s border box.

### Title

The Title submenu lets you configure title text, font size, and margin (space between the title and the Gauge face).

### Segments

![The Segments properties of a segmented gauge](https://3621580088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa5hMAUl7E1cWeN5Rghg0%2Fuploads%2FQlIOPTwFzpoYkWDNx4Hc%2Fvue-gauge-segments.png?alt=media)

* The Gauge supports up to 10 segments. Segments are specified with the values **Segment 1 Start**, **Segment 1 End**, **Segment 2 End**, …, **Segment N End**, where 1 <= N <= 10.
* Segment ends must be contiguous (i.e., you can’t have Segments 1, 2, and 4 but not 3), and must be in increasing order.
* Alternatively, the Segment ends (and Segment 1 start) can be linked to DATRAN node values using **Segment 1 Start Link**, **Segment 1 End Link**, …, **Segment 10 End Link**. If these links are set, the Segments will dynamically redraw themselves in real time as the DATRAN node values change.
* The **Segment 1 Fill**, …, **Segment 10 Fill** properties allow you to change the colour of the segments. In the current version, only solid fill colours are supported.

### Labels

The Labels submenu lets you configure the labels that appear around the Gauge face at the Segment ends.

| Property                      | What it does                                                                                                                                                                         |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Label Font Size, Label Margin | Configure the font size and distance from the Gauge face of the labels                                                                                                               |
| Label Format                  | Visual Basic-style formatting of the labels. `0,0` specifies a comma separator between powers of 1000s, e.g., 12345 => 12,345. `0.00` specifies 2 decimal places, e.g., 12 => 12.00. |
| Label Units                   | Allows an arbitrary units string to be appended to the labels. A space is added between the label value and the unit.                                                                |
| Label Scale                   | Specifies a scaling factor by which the Segment edges are divided for their label value. E.g., for labels in 1000s of units instead of 1s, set the Label Scale to 1000.              |

### Value display

The Value Display submenu is used to configure the numeric display below the Gauge face.

* The **Value Link** property is used to specify the DATRAN node that controls the displayed value on the Gauge (both the numeric display and the needle position).
* The options are similar to those for the labels; the font size, units, format, and scale are configurable in the same manner.
* The **Value Display Visible** property allows the numeric display to be disabled.

### Appearance

* **Background Colour** controls the colour of the white segment in the middle of the Gauge face. This is intended to be set to the same colour as the Form’s background colour.
* **Pointer Guard Fill Colour** controls the colour of the orange segment at the base of the pointer needle.
* **Pointer Fill Colour** controls the colour of the needle itself.
