Line

Line charts join values in order, to show how one or more series trend, rise and fall over time.

LLMs

Basic

Pass lineY the rows and the x and y fields to draw one series as a line, smoothed with a natural curve.

Linear

Set curve to curveLinear to join the points with straight segments, so each change between months reads as a sharp turn.

Step

Set curve to curveStep for a value that holds until the next point, like a price list or a monthly plan.

Multiple

Set z and color to a series field to draw one line per series, with a row of Badge dots naming each one.

Dots

Add a dot mark over the same rows to mark every data point on the line, wrapped in decorative to keep the tooltip clean.

Colored dots

Set color on the dot mark to a category field so each point takes its own palette color while the line stays one color.

Custom dots

Stack a text mark and a hollow dot filled with the surface color to draw a custom marker at each point.

Labels

Add a text mark with a negative dy to print each value just above its point on the line.

Custom labels

Point the text mark's text at a category field to name each point instead of printing its value.

Slopegraph

Use fold to turn two year columns into rows and a point x scale to compare each metro's start and end values.

Series switch

Rebuild the definition when a Segmented changes to swap the plotted series, with a spring motion renderer animating the change.

Missing values

Return null from the y accessor to break the line where data is missing, here every January to March.

End labels

Use select to pick each series' latest row and a text mark to name the line where it ends, instead of a legend.

Moving average

Smooth daily highs and lows with rollingWindow into 14-day means, with a dashed ruleY marking the freezing point.

Indexed

Use normalize with basis: "first" to plot each series as a change from its first value, so different sizes compare fairly.

Bump chart

Use rank to turn values into positions per year and curveBumpX to draw how each series moves up and down the ranking.

Difference

Use differenceY to shade where the price runs above or below its moving average, with exact crossings between points.

Highs and lows

Use select with min and max to find the extreme rows, then mark and label them with dot and text marks.

Change arrows

Draw an arrow from each row's before values to its after values, colored by whether the change went up or down.

KPI sparklines

Turn off guides, the tooltip and pointer focus to draw small trend lines and gradient areas under each metric card.