<label>
<label> is a Graphical
component that renders a label on a <graph>, button, or checkbox.
Attributes and Properties
| Attribute | Type | Values |
|---|---|---|
anchor = "…" | point | |
draggable = "…" | boolean | "true" "false" |
forObject = "…" | ||
layer = "…" | number | |
positionFromAnchor = "…" | text | "upperright" "upperleft" "lowerright" "lowerleft" "top" "bottom" "left" "right" "center" |
| Property | Type |
|---|---|
$l.anchor | point |
$l.backgroundColor | text |
$l.disabled | boolean |
$l.draggable | boolean |
$l.fixed | boolean |
$l.fixLocation | boolean |
$l.hasLatex | boolean |
$l.hidden | boolean |
$l.latex | latex |
$l.layer | number |
$l.positionFromAnchor | text |
$l.text | text |
$l.textColor | text |
$l.textStyleDescription | text |
$l.value | label |
Example: <label> a <point> on a <graph>
Any graphical component (such as a <point>, <line>, or <curve>) will
accept a <label> component as a child.
Example: A stand-alone <label> on a <graph>
A <label> can be placed within a <graph> directly (not as a child of a graphical component). Use the anchor attribute to position the <label>.
Example: <label> a checkbox
A checkbox is rendered by the <booleanInput> component. The <booleanInput> component takes a <label> child.
Example: <label> an <updateValue>
The <updateValue> component, when triggered based on a button click
interaction, can take a <label> child.
Example: <label> a <callAction>
The <callAction> component, when triggered based on a button click interaction,
can take a <label> child.
Example: <label> a <triggerSet>
The <callAction> component, when triggered based on a
button click interaction, can take a <label> child.
Example: <label> within a <legend>
A <legend> can be given <label> children. Labels are assigned to components in the
order in which they are defined within the graph.
Example: <label> a <textInput> on a <graph>
Although a <mathInput/> cannot be placed on a <graph>, a <textInput/> can be
placed on a graph to gather basic numerical or algebraic responses. These responses can then be
redefined as a <math> for use in an <award>. The <textInput/> on the graph
can take a <label> child to prompt the desired input.
Attribute Example: forObject
The forObject attribute is used with a <label> nested inside a <legend> to override
the default label ordering. The default label ordering within a legend matches the order in which
components are defined within the <graph>.
Attribute Example: draggable
The draggable attribute determines whether the <label> can be dragged
around the <graph>. All graphical objects are draggable by default.
Property Example: text
The text property returns the text value of the named <label>.
Property Example: latex
The latex property returns the latex code for rendering the named <label>.
Property Example: value
The value property returns the value stored with the named <label>.