Skip to content
jasondavies edited this page Mar 24, 2013 · 3 revisions

WikiAPI ReferenceGeometryHull Geom

# d3.geom.hull([vertices])

If vertices is not specified, creates a new hull layout with the default settings.

Deprecated: If vertices is specified, returns their convex hull, using the default x- and y-coordinate accessors.

# hull(vertices)

Returns the convex hull for the specified vertices array, using the current x- and y-coordinate accessors. The convex hull is represented by an array containing a subset of the input vertices, arranged in clockwise order.

# hull.x([x])

If x is specified, sets the x-coordinate accessor. If x is not specified, returns the current x-coordinate accessor, which defaults to:

function(d) { return d[0]; }

# hull.y([y])

If y is specified, sets the y-coordinate accessor. If y is not specified, returns the current y-coordinate accessor, which defaults to:

function(d) { return d[1]; }

Clone this wiki locally