legend
The legend module places a 2D legend in the viewer’s overlay, which helps correlate colors to analytical values or materials. The legend shows the relationship between the selected data component for a particular module and the colors shown in the viewer. For this reason, the legend’s Input Object port must be connected to the output of a module which is connected to the viewer and is generally the dominant colored object in view.
Many modules with renderable output ports have a selector to choose which data component is used for coloring. The name of the selected data component is displayed as the title of the legend when the title template uses the {Analyte} variable (the default).
If the data component being viewed is Geo_Layer or Material_ID (for models where the grid is based upon geology), the geologic layer or material names carried with the input object are used for automatic labeling.
The minimum and maximum values are taken from the data input as defined in the datamap. Labels can be placed at user defined intervals along the color scale bar, and can consist of user entered text or automatically determined numerical values.
Ports
| Direction | Name | Type | Description |
|---|---|---|---|
| Input | Input Object | Renderable | A renderable object for creating the Legend color scale. |
| Input | Contour levels | Contours | Information required to properly set contour levels within Legend. |
| Output | Output Object | Renderable | A renderable object displaying the legend. |
Properties
| Property | Type | Description |
|---|---|---|
| Allow Run | Boolean | The Allow Run toggle, when deselected, will prevent the module from running. |
| Execute | Button | This button will force the module to run even if the Allow Run toggle has been turned off. This allows the user to make a number of changes before updating. |
| Orientation | Choice: Horizontal, Vertical | Determines which orientation is used when creating the 2D legend. |
| Anchor Point | Placement | The Anchor Point determines where to place the legend, and which point on the legend to base placement on. |
| Position Offset | 2D Percentage | The horizontal and vertical offset of the legend’s position relative to the anchor point. |
| Overlay | Choice: Behind Scene, In front of scene | Places the legend behind the model or in front of it. |
| Flip Legend | Boolean | The Flip Legend toggle inverts the legend, putting high values at the bottom. |
| Units | String | The units to add to the end of each label. When linked, the units are generated from the first nodal data component in the input field, or the first cell data component if there are no nodal data. |
| Texture X Scale | Double | Scales the colored portion of the legend in the X direction in screen space. |
| Texture Y Scale | Double | Scales the colored portion of the legend in the Y direction in screen space. |
Scale Properties
| Property | Type | Description |
|---|---|---|
| Scale Size | Double | The size of the scale in screen space. |
| Display Scale In Output | Boolean | Specifies whether or not to output the colored portion of the legend in the Output Object port. |
| Force Gradiated Colors | Boolean | Causes the legend to display gradiated colors instead of solid color breaks when contour data is passed in. |
| Equally Size Contours | Boolean | Causes the legend to display each contour as equal in size, rather than relative to the portion of the data range represented. |
| Use Integers As Contours | Boolean | Causes the legend to treat the input data as contoured, with each integer being the label of each contour. |
| Aspect Ratio | Double | Restricts the size of the scale to a percentage of the Scale Size. |
| Boundary Lines | Boolean | Specifies whether or not a boundary box is drawn around the legend scale bar. |
| Value Markers | Boolean | Specifies whether or not a tick mark is drawn at each label location. |
| Boundary Thickness | Double | How thick to draw the boundary lines, as a percentage of the scale size. |
| Boundary Color | Color | The color of the lines that surround the legend. |
| Value Marker Thickness | Double | How thick to draw the ticks, as a percentage of the scale size. |
| Gap Size | Double | How large a gap to leave between solid blocks, when solid blocks are used, as a percentage of the scale size. The labels must be centered, and the legend in solid or textured blocks, for gaps to be allowed. |
Text Properties
| Property | Type | Description |
|---|---|---|
| Labels On | Boolean | Specifies whether or not the data labels are displayed with the legend. |
| Font | Font | The font face used for the title and labels. |
| Title | Expression | The template the title is generated with. Supports the variables {Analyte} and {Units}. |
| Labels | Expression | The template the labels are generated with. Supports the variables {Analyte}, {Value}, and {Units}. |
| Title Offset | 2D Percentage | The horizontal and vertical offset of the title position. |
| Label Offset | 2D Percentage | The horizontal and vertical offset of the label positions. |
| Title Side | Choice: Left, Right, Top, Bottom | Determines which side of the scale to place the title on. |
| Label Side | Choice: Left, Right, Top, Bottom | Determines which side of the scale to place the labels on. |
| Title Size | Double | How large to make the title text. It scales with the Scale Size. |
| Label Size | Double | How large to make the label text. It scales with the Scale Size. |
| Title Alignment | Alignment | The horizontal and vertical alignment of the title. |
| Label Alignment | Alignment | The horizontal and vertical alignment of the labels. |
| Title Color | Color | The color of the legend title. |
| Label Color | Color | The color of the legend labels. |
| Label Min | Boolean | Places a label at the bottom (min) of the data. This only applies to linear or log unformatted labeling. |
| Label Max | Boolean | Places a label at the top (max) of the data. This only applies to linear or log unformatted labeling. |
| Label Bold | Boolean | Determines whether to bold the font used in labels. |
| Label Italic | Boolean | Determines whether to italicize the font used in labels. |
| Centered Analytic Labels | Boolean | Whether or not to use centered labels when working with contoured analytes. |
| Centered Analytic Label | Expression | The template the labels are generated with when working with contoured analytes and Centered Analytic Labels is on. Supports the variables {Analyte}, {MinValue}, {MaxValue}, and {Units}. |
| Label Angle | Double | The angle, in degrees, to rotate the labels. |
| Label Type | Choice: Set By Data, Set By User | Chooses between data generated labels or user specified labels. |
| Logarithmic Decades | Choice: Log, Unformatted | When the data has been log processed, determines how label increments are placed on the color scale bar. If Log is selected the Labels Per Log Decade value is used. If Unformatted is selected the Number Of Intervals is used. |
| Labels Per Log Decade | Integer | The number of label increments per decade when Logarithmic Decades is set to Log. |
| Number Of Intervals | Integer | The total number of label increments for the color scale bar when the data has been processed in linear space or Logarithmic Decades is set to Unformatted. |
| Format Label Numbers | Number Formatting | Sets how numbers that are turned into labels will be formatted. |
| Type In Labels | Editable Strings | The user specified labels, used when Label Type is set to Set By User. |
| Prepend Min | String | A string placed before the label for the minimum value in the legend. |
| Prepend Max | String | A string placed before the label for the maximum value in the legend. |