Help - Legend

From TreeGraph help
Jump to: navigation, search

Legends are used to label groups of nodes. They are positioned on the right of the tree and consist of a bracket or a brace and a describing text. All text formats can be applied to the text and all line formats to the bracket or brace. Additionally there are special legend formats (see below) which can be specified too.

Positioning of legends

Example of different legend formats and positioning

A legend can either have one or two nodes as anchors which define the part of the tree which is labeled. If an internal node is used as an anchor its whole subtree is labeled by the legend. The following examples show different ways to anchor legends.

The article Anchoring legends describes how to select anchors for a legend.

Position index

The position index defines which legends shall be located closer to the tree than another. (The higher the position index the further right a legend is positioned.) Legends that have the same position index are automatically displayed with the same distance to the tree (below each other) if they do not overlap on y.

Minimal distance to the tree

With this value you can define that a legend shall have at least this specified distance to the terminal nodes of the document (the tree). Since its a minimal distance the real distance could also be higher e.g. if wide legends with a lower position index are in the way or another legend with the same position index has a higher minimal distance specified.

Note that you can furthermore specify if legends shall be aligned to the whole tree or only to the part of the tree they are attached to using the document formats.

Legend formats

The respective corner radius is shown in the legend texts.

A legend is both a line- and a text-element, so that line formats and text formats can be applied to it. Additionally a corner radius can be applied to a legend. It defines the radius of the rounded edges of a brace or the length of horizontal lines of a bracket (depending on the selected legend style described below). All these formats can be changed using the element formats-dialog.

Legend style

The style defines whether a legend has a brace (rounded edges) or a bracket (rectangular edges) to enclose the labeled nodes (see image on right).

Text orientation

It can be specified whether the text of a legend should be displayed horizontal, vertical upwards or vertical downwards (see image on right).


Specifies the space that shall be left to neighbouring document elements. Note that these values could not be set for single legends but were located in the document formats before version 2.0.25.

See also