Skip to main content
Public

Share visualization

Loading preview…

Draggable Circles with Voronoi Overlay

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Draggable Circles with Voronoi Overlay

1
CCurran Kelleher
Last edited Mar 1, 2024
Created on Feb 29, 2024

This example demonstrates a Voronoi diagram overlay on a set of draggable, semi-transparent circles. The visualization uses d3-delaunay to compute the Voronoi tessellation from the circles’ current positions, rendering the cells as stroked paths. Each circle can be dragged via d3.drag, updating its coordinates in the state, which triggers a re-render of both the circles and the updated Voronoi cells. The data consists of six circles with varying radii and colors, and the overlay highlights spatial regions closest to each point.

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.

Comments

Sign in to join the discussion.

MIT Licensed