Marks
Bars, lines, dots, areas, pies, rules, and text – the mark types that compose every szum chart.
A mark is a visual encoding – bars, lines, dots, areas, text, rules. Each entry in the marks array draws one layer. Later marks draw on top of earlier ones.
Mark types
Bar
barY and barX, stacking and dodging.
Line
Single and multi-series lines.
Dot
Scatter plots and point marks.
Area
areaY and areaX, stacked areas.
Pie
Pie and donut charts.
Text
Data labels and annotations.
Rule
ruleX and ruleY reference lines.
Shared properties
Every mark accepts:
| Field | Type | Default | Description |
|---|---|---|---|
type | string | – | Required. The mark type. |
data | Datum[] | – | Mark-specific data. Overrides top-level data. |
x | string | "x" | Field name for x position. |
y | string | "y" | Field name for y position. |
fill | string | – | Fill color: field name for color scale, or #hex literal. |
stroke | string | – | Stroke color: field name for color scale, or #hex literal. |
strokeWidth | number | 1 | Stroke width in pixels. |
Composition
Layer marks to build richer charts. A scatter plot with quadrant lines is just dot + ruleX + ruleY. A bar chart with value labels is barY + text:
The quadrant lines divide features into high-impact/low-effort (top-left) vs low-impact/high-effort (bottom-right). Three marks, one config.