geom.line() layer over x/y position scales.
Basic example
scale.x() infers a datetime scale here — Graphy recognizes the abbreviated month names (Jan, Feb, …) as dates — while scale.y() infers a continuous scale from the numeric revenue. To treat the months as plain, evenly-spaced categories instead, use scale.x.discrete().
Multiple series
Map a categorical column tocolor to split the data into one line per category, and add a color scale:
scale.color.palette() draws series colors from Graphy’s default palette. To pin specific colors, use scale.color.discrete({ domain: ['North', 'South'], range: ['#4C6EF5', '#F76707'] }).
Smoothing
Theinterpolate param sets the curve family. The default 'linear' draws straight segments; 'catmull-rom' draws a smooth curve through every point:
Area fill
SetshowFill: true to draw a gradient beneath the line, fading from the series color to transparent at the baseline:
geom.area() instead.
Missing values
Usenull for a missing cell. missingValues controls how the path treats the gap:
Points on the line
Add ageom.point() layer to mark every vertex. It shares the spec-level mapping, so both layers plot the same series. Pipe it after the line so the dots sit on top, and set interactive: false on the point layer:
interactive: false keeps the points out of hit-detection so the line owns hover — it resolves the nearest point along the x-axis and drives the tooltip. Interactive points would make hover fire only when the cursor lands directly on a dot.
Line params reference
Curve family.
'catmull-rom' smooths the line through every point.Stroke width in pixels.
'auto' reads the per-observation strokeWidth aesthetic, falling back to the geom default
when unmapped.Draw a gradient fill beneath the line, from the series color down to transparent at the baseline.
How the path handles
null values: break at the gap ('gap'), span it ('connect'), or treat as zero ('zero').Related
- Chart types overview — the full recipe list
- Axes — labels, ticks, grid and baseline
- Statistics — add a
smoothtrendline - Data structure — how columns feed the mapping

