Skip to content
mbostock edited this page Feb 29, 2012 · 11 revisions

API ReferenceSVG

Brush

# d3.svg.brush()

# brush(selection)

The selection can also be a transition.

# brush.x([scale])

Gets or sets the x-scale associated with the brush. If scale is specified, sets the x-scale to the specified scale; if scale is not specified, returns the current x-scale, which defaults to null. The scale is typically defined as a quantitative scale, which cases the extent to be represented in data space (from the scale's domain); however, it may also be defined as an ordinal scale, in which case the extent is represented in pixel scale (from the scale's range extent.

# brush.y([scale])

# brush.extent([values])

# brush.clear()

# brush.empty()

# brush.on(type[, listener])

Clone this wiki locally