This block is based on Step 3 - Voronoi Scatterplot - Tooltip attached to circle from @NadiehBremer
The Voronoi technics (used to improve interactive experience) is something I like. But I'm quite confused when the mouse is far away from points/subjectsOfMatter. In the original example, this situation arises in the viz's top-left and bottom-right corners.
This block attempts to overcome this issue by:
For the sake of illustration, interactive areas appear in (very) light blue. Interactive zones would not be rendered in the final viz.
The implementation in this block uses a plugin I made (see d3-distanceLimitedVoronoi Github project) that computes the adequate interactive area around each point. The adequate path is: voronoï-cell INTERSECT max-distance-from-point. Others ways could be:
This third implementation of distance-limited voronoi cell is simpler than the 2 others because:
Updated missing url https://raw.githack.com/Kcnarf/d3-distanceLimitedVoronoi/d3v3/distance-limited-voronoi.js to https://raw.githack.com/kcnarf/d3-distancelimitedvoronoi/d3v3/distance-limited-voronoi.js
https://d3js.org/d3.v3.js
https://raw.githack.com/Kcnarf/d3-distanceLimitedVoronoi/d3v3/distance-limited-voronoi.js
https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js
https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js