Label Style

Overview

The label is a common graphical user interface element - text box used to show description or additional data near some element. Label has a lot of settings: visual appearance - like background and font, positioning settings and text formatting.

This label style is applicable to pointers labels or extra labels.

to top

Available Settings

Full XML List for pointers labels:

XML Syntax
Plain code
01 <label_style name="">
02   <position placement_mode="" halign="" valign="" x="" y="" padding="" width="" height="" spread="true/false" anchor="" />
03   <format />
04   <font />
05   <background />
06 </label_style>

The following attributes can be set for the position node:

<position>
Attribute Values Default Description
placement_mode ByPoint | ByRectangle | ByAnchor Center Defines the label pointer placement method.
halign Left | Center | Right Center Sets horizontal label pointer align.
valign Top | Center | Bottom Center Sets vertical label pointer align.
padding Number   Sets the padding for label pointer in percents.
x Number   Sets the "x" coordinate of your label pointer in percents.
y Number   Sets the "y" coordinate of your label pointer in percents.
width Number Auto Sets the width of your label pointer.
height Number Auto Sets the height of your label pointer.
spread Boolean False Sets whether label pointer background is spread to the label pointer container.
anchor LeftTop | CenterTop | RightTop | CenterLeft | Center | CenterRight | LeftBottom | CenterBottom | RightBottom CenterTop Sets the anchor point for label pointer.

Description

Now let's explain the meaning of some attributes. The general difference in label placement is set by placement_mode attribute. When it has "ByPoint" value there is a anchor point for each label and all of the position changes are applied to this point. When it is set to "ByRectangle" the changes are applied to the rectangle that holds label and label's position is defined by top left point of the rectangle which in that case is anchor point. If it is "ByAnchor" the label is always positioned at one side of the pointer. The possible anchor values are listed in description of anchor attribute above.

When placement_mode is "ByPoint" halign and align choose the horizontal and vertical position of the label relative to the anchor point. When placement_mode is "ByRectangle" these attributes change the layout of the label relative to its background. x, y, width and height set the accurate position of label.

spread stretches label background for the pre-set width and height in "ByRectangle" placement_mode

format, font and background nodes for gauges are the same as for the charts.

States Supported

This style supports no states.

to top

to top