Referencelegend

<legend>

<legend> is a Graphical component that renders a legend when nested inside a <graph>. Individual legend entries are defined with the <label> component.

Attributes and Properties

Attributes for <legend>
AttributeTypeValues
applyStyleToLabel = "…"boolean"true" "false"
displayClosedSwatches = "…"boolean"true" "false"
labelIsName = "…"boolean"true" "false"
layer = "…"integer
position = "…"text"upperright" "upperleft" "lowerright" "lowerleft"
Props for <legend name="l">
PropertyType
$l.applyStyleToLabelboolean
$l.disabledboolean
$l.displayClosedSwatchesboolean
$l.fixedboolean
$l.fixLocationboolean
$l.hiddenboolean
$l.labellabel
$l.labelIsNameboolean
$l.layerinteger
$l.positiontext

Example: Default <legend> within a <graph>

By default, <label> children are assigned to graphical objects with unique styleNumber attributes in the order in which they are defined within the <graph>.


Example: <legend> with labels assigned by name

By default, <label> children are assigned to graphical objects with unique styleNumber attributes in the order in which they are defined within the <graph>.

This default order can be altered in the following way: use the forObject attribute within each <label> child, and as its input list the name of the component the label is attached to (no need to include the $).


Attribute Example: position

The default position for the <legend> is in the upper-right corner of the graphing window. To adjust this, use the position attribute. Valid text inputs for this attribute are: upperright, upperleft, lowerright and lowerleft.


Attribute Example: displayClosedSwatches

When a graph contains filled shapes, the displayClosedSwatches attribute can be used to alter the appearance of the symbols within the <legend> from that of the default line.