<orbitalDiagram>
<orbitalDiagram> is a Subject-specific
component that renders an orbital diagram: rows of labeled boxes containing up
and down arrows representing electrons in atomic orbitals.
Most documents use the orbitalDiagram property of an <atom>,
which already returns a fully-populated <orbitalDiagram>. Write an
<orbitalDiagram> directly when you need to display a custom diagram —
for example, the expected diagram for a problem, or a comparison against a
student response from an <orbitalDiagramInput/>.
Attributes and Properties
Attributes for <orbitalDiagram>
Other (1)
textList. Text labels for each orbital row.
Common to all components (9)
copyreference. Create an independent copy of another component by reference. Enter a references a $name.
disabledboolean. Default value: false. Whether this component is disabled and cannot be interacted with.
extendreference. Extend another component by reference, inheriting its children and attributes. Enter a reference as $name.
fixedboolean. Default value: false. Whether this component's value is fixed and cannot be modified.
fixLocationboolean. Default value: false. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
hideboolean. Default value: false. Whether to hide this component from the rendered output.
isResponseboolean. Default value: false. Whether this component is treated as a response for the purposes of assessment.
nametext. The name used to reference this component from elsewhere in the document.
styleNumberinteger. Default value: 1. The style number used to select this component's visual styling from the available style definitions.
Properties for <orbitalDiagram name="o">
Other (5)
$o.disabledboolean. Whether this component is disabled and cannot be interacted with.
$o.fixedboolean. Whether this component's value is fixed and cannot be modified.
$o.fixLocationboolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
$o.valueorbitalDiagram. The orbital diagram value as a list of rows, each with a label and boxes containing up/down arrows.
Common to all components (4)
$o.doenetMLtext. The DoenetML source code that produced this component.
$o.hideboolean. Whether to hide this component from the rendered output.
$o.isResponseboolean. Whether this component is treated as a response for the purposes of assessment.
$o.styleNumberinteger. The style number used to select this component's visual styling from the available style definitions.
Examples
Example: Built-in orbitalDiagram property of an <atom>
The orbitalDiagram property of an <atom> returns an
<orbitalDiagram> filled in to match the element’s ground-state electron
configuration. This is the easiest way to display a diagram for a known
element.
Example: Build a diagram by hand
The body of an <orbitalDiagram> is a tuple list: one parenthesized
tuple per row, listed from lowest to highest sublevel. Inside each tuple,
write one entry per box, using
ufor an up arrow,dfor a down arrow,ud(ordu) for a paired up/down arrow, and- an empty entry (a space between commas) for an empty box.
The labels attribute provides the sublevel label shown to the left of each
row, listed from the lowest row up.
Example: Use as the expected answer for an <orbitalDiagramInput/>
An explicit <orbitalDiagram> can serve as the reference answer for an
<orbitalDiagramInput/> — useful when you want a
particular diagram independent of any <atom> source.
Attribute Examples
Attribute Example: labels
The labels attribute is a list of text labels, one per row, with the bottom
row first. Each label is rendered as the orbital text to the left of the
corresponding row.
Property Examples
Property Example: value
The value property returns the diagram as a list of rows; each row is an
object with an orbitalText label and a boxes array containing strings like
"U", "D", "UD", or "" for each box.