Line chart
Line chart for time series and ordered comparisons, with one series per category and an optional second axis.
Use a line chart for a time series or any ordered x axis where the shape of change matters.
Monthly company mentions
This chart cannot be displayed here: it needs JavaScript and WebGL.
The same chart in each style
Source
```chart
type: line
title: Monthly company mentions
data:
inline:
- { month: "2026-04", company: Fieldwork, mentions: 1120 }
- { month: "2026-05", company: Fieldwork, mentions: 1340 }
- { month: "2026-06", company: Fieldwork, mentions: 1580 }
- { month: "2026-04", company: Northstar, mentions: 2210 }
- { month: "2026-05", company: Northstar, mentions: 2180 }
- { month: "2026-06", company: Northstar, mentions: 2060 }
encoding: { x: month, y: mentions, color: company }
```
Fields that matter
type: linewithencoding.xfor the ordered axis andencoding.yfor the measureencoding.colorsplits one series per categoryencoding.y2adds a second value axis when units differaxes.xandaxes.ysetlabel,format,unit, andaxes.y.min/axes.y.maxfix the value axisstyle.curveismonotone(default),linear,step,step_beforeorstep_afterstyle.curve: step_afterholds a value until the next observationstyle.ratiosets the width to height ratio (16:9 by default)
Primary values appear automatically in complete groups across the shown series: last values first, then first values, then extremes. The total is at most five, or three below 480 px of plot width. If all last-value labels cannot fit clearly, none are drawn. Series names remain separate.
Interactions
- Hover or focus a point to read its value; the crosshair snaps to the nearest observation.
- Click a legend entry to target or toggle a series when the chart has several.
- Zoom and pan on the time axis with brush, wheel, pinch, keys or double-click; Escape or reset returns to the full range.
- Open the Table view, Download PNG or CSV, or Expand the chart.