block by micahstubbs 0202be34ae1182b839fe2712307ea702

distance-limited Voronoi Interaction

Full Screen

an ES2015 d3v4 fork of the bl.ock distance-limited Voronoi Interaction III from Kcnarf

this iteration offers a few improvements and developer comforts:

in a future iteration, I’d like to:


Original README.md


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:

Acknowledgments to:

script.js

index.html

d3-tip.js

v3.js