Skip to main content
100%

Fork of Draggable Circles with Voronoi Overlay

✓ Published0🌍 Public
Aaferdita.e85@gmail.com
Last edited Feb 15, 2025
Created on Feb 15, 2025

This example demonstrates a draggable scatter plot where each point’s interactive region is defined by a Voronoi diagram. Users can click and drag any circle, and its position updates live while the Voronoi overlay recalculates to reflect the new point layout. The visualization uses `select`, `drag`, and `Delaunay` from the `d3` library, with the Voronoi tessellation generated via `delaunay.voronoi([0, 0, width, height])` and rendered as stroked paths. The underlying data is a static set of six colored circles, re-rendered on each drag event.

AI-generated description

An example showing how to make a Voronoi Diagram overlay using d3-delaunay/voronoi.

Reference Examples

Challenge

  • Use a Voronoi Diagram as the interaction surface for one of your existing visualizations, such as a scatter plot or multi-line chart.
MIT Licensed

Similar vizzes