<vectorList>
<vectorList> is a graphical-list component that defines a collection
of <vector> components.
When creating a <vectorList>, separate items by spaces, not commas.
The component will default to displaying the list with commas. (The commas
inside each vector’s (x, y) component tuple are part of the vector itself,
not separators between vectors.)
Attributes and Properties
Attributes for <vectorList>
Other (8)
boolean. Default value: true. Whether to render the items separated by commas (true) or with no separator (false).
avoidScientificNotationWhether to render numbers in full decimal form rather than scientific notation.
displayDecimalsNumber of decimal places to display when rendering this number.
displayDigitsNumber of significant digits to display when rendering this number.
displaySmallAsZeroThreshold below which numbers are displayed as zero.
number. Default value: Infinity. Maximum number of vectors to retain in the list.
padZerosWhether to pad displayed numbers with trailing zeros to fill the requested digits/decimals.
boolean. Default value: false. Whether the order of vectors in this list should be treated as unordered (e.g. for matching).
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.
fixedDefault 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.
isResponseWhether 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 <vectorList name="v">
Other (4)
$v.maxNumbernumber. Maximum number of vectors to retain in the list.
$v.numValuesnumber. The number of vectors in the list.
$v.numVectorsnumber. The number of vectors in the list.
$v.unorderedboolean. Whether the order of items in this list should be treated as unordered (e.g. for matching).
Common to all components (3)
$v.doenetMLtext. The DoenetML source code that produced this component.
$v.hideboolean. Whether to hide this component from the rendered output.
$v.styleNumberinteger. The style number used to select this component's visual styling from the available style definitions.
Examples
Example: Defining a <vectorList> and accessing an item
Each vector is written as (x, y). Spaces between the parenthesized tuples
separate the vectors; the comma between x and y is part of a single
vector. Individual vectors are addressable with array notation.
Example: A <vectorList> on a graph
When placed inside a <graph>, a <vectorList> renders each of
its vectors from the origin. Drag a vector head to update its components.
Example: 3-component vectors
Vectors may have any number of components; all vectors in the list are rendered with the same dimension (the maximum across the list).
Attribute Examples
Attribute Example: unordered
The unordered attribute makes comparisons (e.g., inside a <boolean>
or an <award>) ignore the order of vectors.
Attribute Example: maxNumber
The maxNumber attribute imposes a limit on the number of vectors
retained in the list, regardless of how many are supplied.
Attribute Example: asList
By default a <vectorList> renders its items joined by commas.
Setting asList="false" removes the separator so the items render
concatenated.
Property Examples
Property Example: numVectors
The numVectors property returns the number of vectors in the list. The
alias numValues returns the same value.