<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
| Attribute | Type | Values |
|---|---|---|
applyStyleToLabel = "…" | boolean | "true" "false" |
displayClosedSwatches = "…" | boolean | "true" "false" |
labelIsName = "…" | boolean | "true" "false" |
layer = "…" | integer | |
position = "…" | text | "upperright" "upperleft" "lowerright" "lowerleft" |
| Property | Type |
|---|---|
$l.applyStyleToLabel | boolean |
$l.disabled | boolean |
$l.displayClosedSwatches | boolean |
$l.fixed | boolean |
$l.fixLocation | boolean |
$l.hidden | boolean |
$l.label | label |
$l.labelIsName | boolean |
$l.layer | integer |
$l.position | text |
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.