line
Use for ordered x with numeric y — trends over time or sequenced categories. Optional series draws multiple strokes.
Do not use for unordered category comparison (bar), filled bands (area), or raw sample distributions (hist).
Optional layout: grouped | stacked | percent. Stacked/percent use cumulative y.
x ordered category or number · y number · series optional; layout as bar
Rules. Keep input row order. An empty y is a gap. The line does not connect through it and does not drop to zero. Stacked and percent require every cell.
Example
chart
markvis: 2
type: line
title: Revenue trend
x: month
y: revenue
month,revenue
Jan,120
Feb,180
Mar,150| month | revenue |
|---|---|
| Jan | 120 |
| Feb | 180 |
| Mar | 150 |
When the block is wrong
The rows stay, with one line that names the error.
chart
markvis: 2
type: line
foo: bar
title: Unknown extra field
x: month
y: revenue
month,revenue
Jan,120
Feb,180| month | revenue |
|---|---|
| Jan | 120 |
| Feb | 180 |
E_UNKNOWN_FIELD: undeclared fence field: foo
Generated from packages/types/line/ and the type's row in SPEC.md.