Skip to content
kforeman edited this page Nov 16, 2011 · 18 revisions

API ReferenceSVG

D3’s axis component displays reference lines for scales automatically. This lets you focus on displaying the data, while the axis component takes care of the tedious task of drawing axes and labeled ticks.

Axis

The axis component is designed to work with any of D3’s quantitative scales.

# d3.svg.axis()

# axis(selection)

The selection can also be a transition.

# axis.scale([scale])

# axis.orient([orientation])

# axis.ticks([arguments…])

# axis.tickSubdivide([n])

# axis.tickSize([major[​[, minor], end]])

# axis.tickPadding([padding])

# axis.tickFormat([format])

A format can be passed to override the scale's default.

Clone this wiki locally