legend

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

DirectionNameTypeDescription
InputInput ObjectRenderableA renderable object for creating the Legend color scale.
InputContour levelsContoursInformation required to properly set contour levels within Legend.
OutputOutput ObjectRenderableA renderable object displaying the legend.

Properties

PropertyTypeDescription
Allow RunBooleanThe Allow Run toggle, when deselected, will prevent the module from running.
ExecuteButtonThis 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.
OrientationChoice: Horizontal, VerticalDetermines which orientation is used when creating the 2D legend.
Anchor PointPlacementThe Anchor Point determines where to place the legend, and which point on the legend to base placement on.
Position Offset2D PercentageThe horizontal and vertical offset of the legend’s position relative to the anchor point.
OverlayChoice: Behind Scene, In front of scenePlaces the legend behind the model or in front of it.
Flip LegendBooleanThe Flip Legend toggle inverts the legend, putting high values at the bottom.
UnitsStringThe 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 ScaleDoubleScales the colored portion of the legend in the X direction in screen space.
Texture Y ScaleDoubleScales the colored portion of the legend in the Y direction in screen space.

Scale Properties

PropertyTypeDescription
Scale SizeDoubleThe size of the scale in screen space.
Display Scale In OutputBooleanSpecifies whether or not to output the colored portion of the legend in the Output Object port.
Force Gradiated ColorsBooleanCauses the legend to display gradiated colors instead of solid color breaks when contour data is passed in.
Equally Size ContoursBooleanCauses the legend to display each contour as equal in size, rather than relative to the portion of the data range represented.
Use Integers As ContoursBooleanCauses the legend to treat the input data as contoured, with each integer being the label of each contour.
Aspect RatioDoubleRestricts the size of the scale to a percentage of the Scale Size.
Boundary LinesBooleanSpecifies whether or not a boundary box is drawn around the legend scale bar.
Value MarkersBooleanSpecifies whether or not a tick mark is drawn at each label location.
Boundary ThicknessDoubleHow thick to draw the boundary lines, as a percentage of the scale size.
Boundary ColorColorThe color of the lines that surround the legend.
Value Marker ThicknessDoubleHow thick to draw the ticks, as a percentage of the scale size.
Gap SizeDoubleHow 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

PropertyTypeDescription
Labels OnBooleanSpecifies whether or not the data labels are displayed with the legend.
FontFontThe font face used for the title and labels.
TitleExpressionThe template the title is generated with. Supports the variables {Analyte} and {Units}.
LabelsExpressionThe template the labels are generated with. Supports the variables {Analyte}, {Value}, and {Units}.
Title Offset2D PercentageThe horizontal and vertical offset of the title position.
Label Offset2D PercentageThe horizontal and vertical offset of the label positions.
Title SideChoice: Left, Right, Top, BottomDetermines which side of the scale to place the title on.
Label SideChoice: Left, Right, Top, BottomDetermines which side of the scale to place the labels on.
Title SizeDoubleHow large to make the title text. It scales with the Scale Size.
Label SizeDoubleHow large to make the label text. It scales with the Scale Size.
Title AlignmentAlignmentThe horizontal and vertical alignment of the title.
Label AlignmentAlignmentThe horizontal and vertical alignment of the labels.
Title ColorColorThe color of the legend title.
Label ColorColorThe color of the legend labels.
Label MinBooleanPlaces a label at the bottom (min) of the data. This only applies to linear or log unformatted labeling.
Label MaxBooleanPlaces a label at the top (max) of the data. This only applies to linear or log unformatted labeling.
Label BoldBooleanDetermines whether to bold the font used in labels.
Label ItalicBooleanDetermines whether to italicize the font used in labels.
Centered Analytic LabelsBooleanWhether or not to use centered labels when working with contoured analytes.
Centered Analytic LabelExpressionThe 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 AngleDoubleThe angle, in degrees, to rotate the labels.
Label TypeChoice: Set By Data, Set By UserChooses between data generated labels or user specified labels.
Logarithmic DecadesChoice: Log, UnformattedWhen 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 DecadeIntegerThe number of label increments per decade when Logarithmic Decades is set to Log.
Number Of IntervalsIntegerThe 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 NumbersNumber FormattingSets how numbers that are turned into labels will be formatted.
Type In LabelsEditable StringsThe user specified labels, used when Label Type is set to Set By User.
Prepend MinStringA string placed before the label for the minimum value in the legend.
Prepend MaxStringA string placed before the label for the maximum value in the legend.