Vertical Gauge Labels Configuration
- Overview
- Labels Parameters
- Enabling/Disabling labels
- Positioning labels
- Formatting labels
- Showing first and last labels
Overview
Axis Labels are labels that are drawn near major tickmarks. You can adjust their font size, font color, a wide range of other attributes and define their font family. Also you may choose from what side should the labels be displayed (align) and how far they should stand from the tickmarks (padding).
Typical XML settings for the labels are:
Labels Parameters
The following attributes can be set for labels:
| Attribute | Values | Default | Description |
|---|---|---|---|
| enabled | true | false | false | Sets whether labels are enabled or not |
| show_first | true | false | True | Whether the label of first tickmark is shown |
| show_last | true | false | True | Whether the label of last tickmark is shown |
| padding | Number | Auto | The padding of labels |
| align | Inside | Outside | Center | Center | Sets the position of labels |
| text_align | Near | Center | Far | Center | Defines the distance between gauge and label text |
| rotation | Number | 0 | Sets the angle of label's rotation |
Enabling/Disabling labels
By default labels are enabled, but you can disable them this way:
The result is as follows:

Positioning Labels
There are four nodes responsible for text positioning. They are: align, text_align, padding and rotation. Let's look at some samples demonstrating the practical usage of these nodes.
In this sample we will use align and padding attributes. Align attribute has three states: "Inside", "Outside" and "Center". In case of Vertical Linear Gauges "Inside" means position of labels to the left from the scale, "Center" - inside the scale and "Outside" - to the right from the scale. Padding attribute is set in percents and defines how far from the scale we move the text. Padding can be represented in positive or negative values, which affects the direction of text's movement. For "Center" and "Outside" states of align attribute positive values move the label to the right, and negative - to the left. For the "Inside" state positive - left, negative - right. Let's imagine we want to create a gauge with labels standing to the right from the scale and that some distance should separate them. We use the following settings:
The result is as follows:

The rotation attribute affects on the text rotation angle and is set in degrees:
So, we rotate our labels 90 degrees CCW:

Formatting Labels
The labels can be formatted using subnodes of label node: Font, Format and Background. Let's change the label format: add a postfix "$", make label bold, set number of decimal signs after zero to 2, change label's opacity, color label's background in yellow and the label itself - in red:

Showing first and last Labels
You can choose whether to show first/last label value or not. This is done in a simple way, by setting true or false to show_first/show_last attribute:
In this example we have disabled showing both first and last labels:

