cue.selector

A selector the scene walks, standing on each choice in turn. Its at: is an ordinary cue anchor, so it fires when the rest of its step's choreography says it does, and the step's play, pause and replay drive it. duration: is the dwell on each choice rather than the time for the whole list, which is the one place the two cue controls differ — so its span depends on how many choices there are, a fact about the data rather than about the attribute. It takes no easing:: a dwell per choice is a constant rate by construction, and easing a discrete walk would make some choices linger and others flash past. The reader may still pick from the list, and doing so displaces the walk rather than stopping it.

cue.selectorNode
Three frames of a walk through the choices: the same bars redrawn for Brazil, then India, the menu beneath the plot moving with them.Three frames of a walk through the choices: the same bars redrawn for Brazil, then India, the menu beneath the plot moving with them.

#Attributes

parameterRequiredImplicit
The parameter this control declares and drives — slider:a, and the whole scene's a from then on. One letter is the ordinary case, and the only one an expression can read: curve: a*x^2 reaches it by that letter. A word (selector:country) is for a parameter that never appears in a formula, and cannot be read in maths — to the expression parser country is a product of seven letters.
parameter-name
Also written: varCan be written as shorthand: cue.selector:value
name
What the parameter is called in front of a reader. Rich text, so Frequency bb sets its own maths.
Also written: label
over
A dataset column the parameter runs over: over: #pop.year. Its cells are the stops, their span is the range, and what they are decides the format — so range: is not consulted where this is given. A column of NAMES gives a parameter whose values are those names. This is the shape long-format data arrives in, and the shape a mark's slice: reads: the mark names the column, not the parameter, and the two meet at the column.
Also written: column
format
What the values are, for the readout: numbers, dates, months, weekdays, hours, weeks or names. Every one but the last places a value on its own number line — position 1…12 for a month, a fractional year for a date — so the range stays a pair of numbers and only the reading changes. names has no number line: the values are the data's own words. auto takes the kind from the column over: names, and is numeric where no column was named.
autonumbersdatesmonthsweekdayshoursweeksnames
Also written: values
Defaultauto
range
Range interval [start, end]. Ignored where over: or options: gives the stops: those decide.
Default[-10, 10]
step
Distance between stops. Absent, 1 — or, under over:, the closest the data's own values come to each other, which is the spacing that can reach every row.
default
Where it starts. Absent, 0 — or, under over:, the first value in the column. Where the stops are names this is an INDEX among them, since a name has no number line to sit on; writing the wanted one first in options: is the usual way to say which opens.
Also written: start
hiddenAnimatable
Keeps the control out of the footer: the expressions still read the parameter, the reader cannot move it.
Defaultfalse
lock
Keeps the reader from editing it on an editable: graph.
Also written: locked
Defaultfalse
options
The stops, written out — options: [linear, log, logit], or options: [1, 2, 5, 10]. Numbers give a numeric parameter with stops no step: ladder can express; anything else gives names, and one unreadable entry makes the whole list names — [1, 2, many] is three labels, not a number line with a word on the end. It outranks over:, which outranks range:/step:; writing it beside over: is refused, as two claims about the same list.
Also written: choices
at
When the sweep starts — a step index (2), a time (1.5s), or the compound form (3 + 1.5s), read exactly as every other cue anchor is.
Default0
duration
How long it stands on EACH choice, written as a duration (2s, 800ms). Not the time for the whole list: a slider's range is a fixed span whatever the data says, so a total is the honest way to pace it, but a selector's list is as long as the data is and "two seconds each" is the intention an author has. Five countries at 2s is a ten-second walk and twenty countries is forty. The last choice is held.
Default2s

#Derived attributes

Computed while the element renders — read one with #id.name in attribute position or {{#id.name}} in prose, never set.

valueDerived
Where the parameter currently stands: the walk, displaced by whatever the reader has picked.

#Allowed in

#Examples

cue.selector:country(over: #pop.country; at: 1; duration: 2s)
cue.selector:mode(options: [linear, log]; at: 2; duration: 4s)

Last updated