line

lineNode

A path through a run of points. x: and y: hold one axis each, paired by position — numbers written out, or dataset columns (x: #co2.year; y: #co2.ppm). Drawn straight between the points by default; interpolate: step instead holds each value until the next x and then jumps, giving a staircase, and marks each jump with a dot: filled where the function lands, hollow where it left.

Only withxyargandpolarplane

#Attributes

On any plane

period
Also written: atLong-format data: one row per x per period, this naming the period column. The line then shows the slice at whatever the environment's parameter.time holds, gliding between the two periods that bracket it.
colourAnimatable
neutralredorangeyellowgreentealbluepurplepinkgreywhiteblack
Also written: colorColour of the path.
Defaultpink
widthAnimatable
Stroke width.
Default2
interpolateAnimatable
linearstepbezier
Also written: interpolationHow it gets from one reading to the next: linear joins them, step holds and jumps, bezier rounds the corners off with a cubic through every reading whose handles sit at the midpoints of the legs either side (t = 0.5, so it cannot overshoot). A curve says the quantity varied smoothly between the readings; a tally did not.
Defaultlinear
endpoints
Also written: dotsOn a step, the dots at each jump — filled where the value is taken, hollow where it is not.
Defaulttrue
risers
Also written: connectOn a step, the vertical joins between treads. Off by default: a function has one value at each x.
Defaultfalse
Text drawn beside the line — rich text.
hiddenAnimatable
Declared and framed, but not drawn.
Defaultfalse
Also written: lockedA reader may not edit it on an editable graph.
Defaultfalse
text-sizeAnimatable
Size of the label.
Default20
layerAnimatable
Paint order among the marks: a higher layer is drawn later, on top; equal or omitted, the marks stack in document order (later on top). Written z: before the argand plane took that letter for its coordinate.
Only withxyplane
xImplicitAnimatable
The x readings: numbers (0, 1, 2 — entries may be expressions of parameters), or a dataset column (#co2.year). A column of names reads against a categorical axis (x format:, or the axis’s auto rule); an ISO date column reads as fractional years (2024-03-15 → ≈2024.2), and auto labels them in years. Paired with y by position.Can be written as shorthand: line:value
yAnimatable
The y readings, paired with x by position.
Only withargandplane
zAnimatable
On the argand plane, the readings as complex numbers: written out (1 + i, 2 - i, -3i, a bare number a real), or a column of complex literals bound whole (#roots.z). Instead of re/im.
reAnimatable
On the argand plane, the readings' real parts, one per reading — numbers written out or a column — paired with im by position.
imAnimatable
On the argand plane, the readings' imaginary parts, paired with re by position.
Only withpolarplane
rAnimatable
On the polar plane, the readings' distances from the origin, paired with theta by position.
thetaAnimatable
On the polar plane, the readings' angles in radians (60deg for degrees), paired with r by position; names on a categorical theta.

#Allowed in

#Examples

line(x: 0, 2, 4; y: 0, 2, 1; colour: pink)
line(x: 0, 1, 2; y: 0, 0.5, 1; interpolate: step)
line(x: #co2.year; y: #co2.ppm)
line(x: #temperatures.month; y: #temperatures.sydney)