axes section controls how each position scale is drawn — its label, side, grid lines and ticks. It’s keyed by axis: x, y, and ySecondary for combo charts.
Per-axis options
string | null
Axis title text.
null means no label.boolean
default:"true"
Whether the axis is drawn at all.
'left' | 'right' | 'top' | 'bottom'
Which side the axis sits on. Defaults to
'bottom' for x and 'right' for
y.object
Grid lines for this axis — see below.
object
Ticks for this axis — see below.
Grid lines
Each axis owns its grid. Config decides whether the lines are drawn:boolean | null
default:"null"
true/false to force visibility; null lets the engine decide from the
geom (e.g. bar charts hide the category-axis grid). With nothing to decide
from, x and y grids show and a secondary y grid stays hidden.gridLine target:
Ticks
boolean
Whether tick marks — the short lines that step out of the axis — are
drawn. Defaults to
true for x and false for y. Tick labels render
either way; their paint lives on the stylesheet’s tickLabel target, and the
marks’ on tickLine.'auto' | 'edges'
default:"auto"
'auto' places ticks across the axis; 'edges' collapses a continuous or
datetime axis to the two domain endpoints. Discrete axes keep their full
domain either way.The axis controls labels, ticks and grid; the range of an axis comes from its scale
— use
scale.y.continuous({ domainMin: 0, nice: true }) to pin bounds.The second y axis
ySecondary is a sparse override of the primary y axis, for
combo charts that pair two value scales. Every field you leave unset
is inherited when the chart compiles:
ySecondary.position, it stays on that side however y moves.
Panel border and baseline
The panel is the plot area. Its border is painted from the stylesheet, one entry per edge, which is how you draw a single baseline under the bars or a full frame around the plot:.top, .right, .bottom, .left) takes color, strokeWidth and
lineType. An edge with strokeWidth: 0 is hidden and reserves no space, so the bare
style.panelBorder({ strokeWidth: 0 }) entry above clears all four before the baseline is put back.
Corner rounding is panel-wide and lives on the bare builder:
borderRadius: 8. See
Styling for how entries resolve.
Related
- Scales — the axis range and type
- Styling — grid, tick, panel-border and frame paint
- Layout › Panel overflow — how the panel makes room for labels that spill past its edge

