dispatch.on()

dispatch.on(typenames[, callback]) Adds, removes or gets the callback for the specified typenames. If a callback function is specified, it is registered for the specified (fully-qualified) typenames. If a callback was already registered for the given typenames, the existing callback is removed before the new callback is added. The specified typenames is a string, such as start or end.foo. The type may be optionally followed by a period (.) and a name; the optional name allows multiple callba

dispatch.copy()

dispatch.copy() Returns a copy of this dispatch object. Changes to this dispatch do not affect the returned copy and vice versa.

dispatch.call()

dispatch.call(type[, that[, arguments…]]) Like function.call, invokes each registered callback for the specified type, passing the callback the specified arguments, with that as the this context. See dispatch.apply for more information.

dispatch.apply()

dispatch.apply(type[, that[, arguments]]) Like function.apply, invokes each registered callback for the specified type, passing the callback the specified arguments, with that as the this context. For example, if you wanted to dispatch your custom callbacks after handling a native click event, while preserving the current this context and arguments, you could say: selection.on("click", function() { dispatch.apply("custom", this, arguments); }); You can pass whatever arguments you want to c

diagram.triangles()

diagram.triangles() Returns the Delaunay triangulation of the specified data array as an array of triangles. Each triangle is a three-element array of elements from data. Since the triangulation is computed as the dual of the Voronoi diagram, and the Voronoi diagram is clipped by the extent, a subset of the Delaunay triangulation is returned.

diagram.polygons()

diagram.polygons() Returns an array of polygons clipped to the extent, one for each cell in the diagram. Each polygon is represented as an array of points [x, y] where x and y are the point coordinates, and a data field that refers to the corresponding element in data. Polygons are open: they do not contain a closing point that duplicates the first point; a triangle, for example, is an array of three points. Polygons are also counterclockwise, assuming the origin ⟨0,0⟩ is in the top-left cor

diagram.links()

diagram.links() Returns the Delaunay triangulation of the specified data array as an array of links, one for each edge in the mesh. Each link has the following attributes: source - the source node, an element in data. target - the target node, an element in data. Since the triangulation is computed as the dual of the Voronoi diagram, and the Voronoi diagram is clipped by the extent, a subset of the Delaunay links is returned.

diagram.find()

diagram.find(x, y[, radius]) Returns the nearest site to point [x, y]. If radius is specified, only sites within radius distance are considered. See Philippe Rivière’s bl.ocks.org/1b7ddbcd71454d685d1259781968aefc for an example.

diagram

diagram The computed Voronoi diagram returned by voronoi has the following properties: edges - an array of edges. cells - an array of cells, one per input point; a cell may be null for a coincident point.

d3.zoomTransform()

d3.zoomTransform(node) Returns the current transform for the specified node. Note that node should typically be a DOM element, not a selection. (A selection may consist of multiple nodes, in different states, and this function only returns a single transform.) If you have a selection, call selection.node first: var transform = d3.zoomTransform(selection.node()); In the context of an event listener, the node is typically the element that received the input event (which should be equal to event