cue.selector
A selector the scene steps through, one choice at a time.


#Attributes
parameterThe parameter the control declares —
slider:a — which is the scene's from then on, wherever the control is written. One control declares a parameter: a second for the same name in the scene is refused. An expression reads a parameter by its letter, so a parameter an expression uses is one letter; a word such as country is read in maths as a product of letters, and names a parameter no expression reads.parameter-nameAlso written:
varCan be written as shorthand: cue.selector:valuenameThe row's label in the footer, in place of the parameter's letter. Rich text, so
Frequency $b$ sets its own maths.Also written:
labelcolumnA dataset column to take the stops from:
column: #pop.year. A column of numbers gives its distinct values in ascending order as the stops, and the smallest and largest as the range; range: is not read. A column of text gives its distinct names, in the order the rows first give them. A mark's slice: on the same column draws the rows at the parameter's value.formatHow the value reads in the footer.
numbers; dates, a year with its fraction read as a date; months, 1 to 12 read Jan to Dec; weekdays, 1 to 7 read Mon to Sun; hours, hours from midnight read as a clock time; weeks, a year with its fraction read as a year and week; names, the data's own words. Every format but names keeps a number line, so range: and step: stay numbers. auto takes the format from the column:, and is numbers without one; a written format is used instead of the column's.autonumbersdatesmonthsweekdayshoursweeksnamesDefault
autorangeThe ends,
[start, end]. An end may be a constant expression: [0, 2pi]. Not read where column: or options: gives the stops.Default
[-10, 10]stepThe distance between stops on the reader's track. Absent, 1 — or, under
column:, the smallest gap between two of the column's values.defaultThe starting value, held inside the range. Absent, 0 — or, where
column: or options: gives the stops, the first of them. Where the stops are names it is an index among them, counted from 0.Also written:
starthiddenLeaves the control's row out of the footer.
Default
falselockHas no effect on a control: an
editable graph lists its marks for the reader to change, and no control is among them.Also written:
lockedDefault
falseoptionsThe stops, written out as a list:
options: linear, log, logit or options: (1, 2, 5, 10). A list of numbers gives a numeric parameter with those stops in ascending order. Any entry that is not a number makes the whole list names, in the order written: 1, 2, many is three names. Square brackets are not a list: options: [1, 2] is one option. A control with both options: and column: is refused.Also written:
choicesatThe anchor the movement starts on — a step (
2), a time (1.5s) or both (3 + 1.5s), read as every cue anchor is. Before it fires, the parameter stands at its default:.Default
0durationThe time on EACH choice, written as a duration:
2s, 800ms. Five choices at 2s take ten seconds.Default
2s#Derived attributes
Computed while the element renders — read one with #id.name in attribute position or {{#id.name}} in prose, never set.
valueWhere the parameter currently stands: the walk, displaced by whatever the reader has picked.
#Allowed in
#Examples


graph{
cue.selector:country(column: #pop.country; at: 1; duration: 2s)
bar(x: #pop.year; y: #pop.millions; slice: #pop.country)
}(
x-format: discrete
)

graph{
curve(expression: sin(k * x))
cue.selector:k(options: 1, 2, 3; at: 2; duration: 1s)
}(
x-domain: [0, 6.28]
)#Notes
- It stands on each choice in turn from its
default:and holds the last, starting on the anchorat:names. - The movement is part of the step's choreography, so the step's play, pause and replay drive it.
- The reader keeps the control. Moving it while the step is still playing pauses the scene with the parameter where they put it; pressing play returns it to where the scene had it when they took hold, and the choreography carries on.
- Replaying the step runs every control the reader did not touch from its start and leaves the ones they moved.
- Leaving the step hands every control back.