novus/nvd3 — pull request #584 by luke3141 (2014-06-12 16:42:33+00:00)
Title: Delete duplicates from vertices before passing to voronoi (v2.0.0-dev)

This is a rebased pull request of #448 on the refactored code. More discussion and testing available there.

`d3.geom.voronoi()` requires that there are no duplicates in the vertices passed to it.

Previously each vertex was randomised by +/- 1e-7 to try to avoid duplicates. `d3.geom.voronoi()` considers that vertices are identical if they are within 1e-6, so this did not always work. Rather than just increase the randomisation, this change actively deletes duplicate vertices.

This change may render pull request #581 obsolete. It's unclear what circumstance in #581 `d3.geom.voronoi()` is returning undefined values. However I noticed undefined values when I had duplicate vertices.