cue.slider

A slider the scene drives, plus the two attributes a cue takes: at:, the anchor it starts on, and duration:, how long it takes to run its range end to end. A choropleth moving through its years is cue.slider:t(over: #pop.year; at: 2); the same parameter dragged by hand instead is slider:t(over: #pop.year). It is a cue rather than a play: flag because everything that follows from being one is wanted: the anchor is the ordinary one, the host's transport finds the sweep by walking anchors as it finds every other piece of choreography, and the play, pause and replay the reader gets are the step's. duration: is the time to cross the whole range, so a default: part way along it finishes in proportionally less. The reader still gets the track, and dragging it displaces the sweep rather than stopping it: playing on carries the parameter from wherever they let go, at the rate the author set. What moves is the sweep's own elapsed time and never the scene clock — moving that would drag every other cue in the scene along with it — and their displacement is handed back when they leave the step or replay it.

cue.sliderNode
Three frames of a sweep: a sine wave whose amplitude runs from 0 through 2 to 4, the scrubber beneath the plot moving along with it.Three frames of a sweep: a sine wave whose amplitude runs from 0 through 2 to 4, the scrubber beneath the plot moving along with it.

#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.slider: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
discrete
Stand on one stop at a time. Continuous (the default), the parameter moves through the gaps between stops and the marks glide with it; discrete, it snaps to the nearest — the data's own values, or the step ladder — and the marks jump from one slice to the next, for a quantity that is not a continuous function of the axis.
Also written: stepped
Defaultfalse
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 the sweep takes to run the range end to end, written as a duration like every other in the language: 8s, 1500ms.
Default8s
easing
How the sweep is paced. linear by default and not smooth: a parameter's range is a scale the reader reads values off, and easing in and out of it would make the same span of screen mean different amounts of the quantity at different moments.
linearsmooth
Defaultlinear

#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 sweep, displaced by whatever the reader has dragged.

#Allowed in

#Examples

cue.slider#years:t(over: #rates.year; name: Year; at: 1; duration: 12s)
cue.slider:a(range: [0, 4]; at: 2; duration: 3s)

Last updated