Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Releases: d3/d3-voronoi

v1.1.4

24 Aug 21:23
Compare
Choose a tag to compare
  • Housekeeping.

v1.1.3

24 Aug 19:00
Compare
Choose a tag to compare
  • Update dependencies.

v1.1.2

10 Mar 18:32
Compare
Choose a tag to compare
  • Update dependencies.

v1.1.1

03 Jan 17:37
Compare
Choose a tag to compare

v1.1.0

27 Oct 18:37
Compare
Choose a tag to compare

v1.0.2

02 Aug 21:23
Compare
Choose a tag to compare
  • Add module entry point to package.json.

v1.0.1

03 Jul 13:45
Compare
Choose a tag to compare
  • Fix voronoi.size when the minimum values of the extent are non-zero.

v1.0.0

15 Jun 23:03
Compare
Choose a tag to compare
  • 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

08 Jun 00:30
Compare
Choose a tag to compare
  • Export to the global d3 in vanilla environments (d3/d3#2840).

v0.3.3

20 May 19:41
Compare
Choose a tag to compare
  • Fix occasional crash when clipping cells (#7).