Line
A line is the right default for a continuous numeric trend over time (or any naturally ordered x). Multiple series share the same axes via stroke.
Single series
Section titled “Single series”```plot view=daily_signupsPlot.line(data, { x: "date", y: "count" })```Multiple series
Section titled “Multiple series”```plot view=daily_signups_by_sourcePlot.line(data, { x: "date", y: "count", stroke: "source" })```With markers and tooltip
Section titled “With markers and tooltip”```plot view=daily_signups{ marks: [ Plot.line(data, { x: "date", y: "count" }), Plot.dot(data, { x: "date", y: "count", r: 3 }), Plot.tip(data, Plot.pointer({ x: "date", y: "count" })), ]}```Common options
Section titled “Common options”| Option | Meaning |
|---|---|
x, y | column names (x is usually a date or ordered numeric) |
stroke | column name → series color |
strokeWidth | line thickness in px |
strokeDasharray | e.g. "4 2" for dashed lines |
curve | "linear" (default), "monotone-x", "step", "basis", "natural" |
marker | true or "circle", "arrow", etc. for per-point markers |
z | column name → grouping (use when stroke isn’t set) |
tip | true for hover tooltips |
See Observable Plot — line for the full reference.