szum

Marks

The building blocks of every 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

Shared properties

Every mark accepts:

FieldTypeDefaultDescription
typestringRequired. The mark type.
dataDatum[]Mark-specific data. Overrides top-level data.
xstring"x"Field name for x position.
ystring"y"Field name for y position.
fillstringFill color: field name for color scale, or #hex literal.
strokestringStroke color: field name for color scale, or #hex literal.
strokeWidthnumber1Stroke 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.

On this page