Releases: d3/d3-voronoi
v1.1.4
v1.1.3
v1.1.2
v1.1.1
- Fix crash with coincident points in diagram.find. (#21)
- Fix crash with coincident points in diagram.triangles.
v1.1.0
v1.0.2
v1.0.1
- Fix voronoi.size when the minimum values of the extent are non-zero.
v1.0.0
- First stable release.
- Simplify the Voronoi diagram definition: diagrams are either clipped or unclipped, not both.
- Fix the Voronoi polygons in the case where no cells have edges after clipping.
Changes since D3 3.x
The d3.geom.voronoi method has been renamed to d3.voronoi, and the voronoi.clipExtent method has been renamed to voronoi.extent. The undocumented polygon.point property in 3.x, which is the element in the input data corresponding to the polygon, has been renamed to polygon.data.
Calling voronoi now returns the full Voronoi diagram, which includes topological information: each Voronoi edge exposes edge.left and edge.right specifying the sites on either side of the edge, and each Voronoi cell is defined an array of these edges and a corresponding site. The Voronoi diagram can be used to efficiently compute both the Voronoi and Delaunay tessellations for a set of points: diagram.polygons, diagram.links, and diagram.triangles. The new topology is also useful in conjunction with TopoJSON; see the Voronoi topology example.
The voronoi.polygons and diagram.polygons now require an extent; there is no longer an implicit extent of ±1e6. The voronoi.links, voronoi.triangles, diagram.links and diagram.triangles are now affected by the clip extent: as the Delaunay is computed as the dual of the Voronoi, two sites are only linked if the clipped cells are touching. To compute the Delaunay triangulation without respect to clipping, set the extent to null.
The Voronoi generator finally has well-defined behavior for coincident vertices: the first of a set of coincident points has a defined cell, while the subsequent duplicate points have null cells. The returned array of polygons is sparse, so by using array.forEach or array.map, you can easily skip undefined cells. The Voronoi generator also now correctly handles the case where no cell edges intersect the extent.
See CHANGES for all D3 changes since 3.x.
v0.4.0
- Export to the global
d3
in vanilla environments (d3/d3#2840).