Skip to content
mbostock edited this page Oct 10, 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])

Clone this wiki locally