Encoding

encoding binds field names to channels. x is the category or time. y is the measure. The same names work across chart types.

spec.json200 · valid

Open the playground to edit a spec with validate, repair, and export.

Channels

encoding.x and encoding.y are field names. encoding.y may be a list of channels. A heatmap measure is encoding.color, not encoding.value. A donut uses encoding.x for the slice label and encoding.y for the value.

Second axis

Put a channel on the right axis with axis: "y2". The title is axes.y2.title. Combo does not use encoding.bar.