Voroni & Chromatic Scale
✓ Published0🌍 Public
Aallardw
Last edited Jun 28, 2016
Created on Jun 28, 2016
A Voronoi diagram partitions the view into 2,000 irregular polygons generated from random coordinates, with each cell filled using the `d3.interpolateRdYlBu` continuous color scale from `d3-scale-chromatic`. Hovering over a cell recalculates all fills based on the distance from the hovered point to every other polygon’s data point, reusing the same color interpolator. The visualization relies on `d3.voronoi` for the tessellation and renders paths as SVG, with the hover interaction driven by `mouseover` events.
AI-generated descriptionCreates a d3-voronoi diagram for a couple of random coordinates. The color of the polygons is defined by a continuous color scheme based on ColorBrewer using d3-scale-chromatic.
Example in D3 v4.0