Gathering detailed insights and metrics for @visx/voronoi
Gathering detailed insights and metrics for @visx/voronoi
Gathering detailed insights and metrics for @visx/voronoi
Gathering detailed insights and metrics for @visx/voronoi
npm install @visx/voronoi
Typescript
Module System
Node Version
NPM Version
96.6
Supply Chain
87.3
Quality
82
Maintenance
100
Vulnerability
99.6
License
TypeScript (97.49%)
CSS (1.28%)
JavaScript (1.23%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
20,134 Stars
3,260 Commits
742 Forks
136 Watchers
29 Branches
163 Contributors
Updated on Jul 10, 2025
Latest Version
3.12.0
Package Id
@visx/voronoi@3.12.0
Unpacked Size
12.30 kB
Size
4.55 kB
File Count
15
NPM Version
lerna/7.0.2/node@v16.14.0+x64 (linux)
Node Version
16.14.0
Published on
Nov 07, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
A Voronoi diagram partitions a two-dimensional plane into regions based on a set of input points. Each unique input point maps to a corresponding region, where each region represents all points that are closer to the input point than to any other input point.
Not only are Voronoi diagrams 😍, but they can be used to improve the interactive experience of a visualization. This is most often accomplished by overlaying an invisible voronoi grid on top of the visualization to increase the target area of interaction sites such as points on a scatter plot.
The @visx/voronoi
package provides a wrapper around the existing
d3-voronoi package with some react
-specific utilities.
npm install --save @visx/voronoi
The @visx/voronoi
package exports a wrapped version of the d3 voronoi
layout for flexible usage,
as well as a <VoronoiPolygon />
component for rendering Voronoi regions.
1import { voronoi, VoronoiPolygon } from '@visx/voronoi'; 2 3const points = Array(n).fill(null).map(() => ({ 4 x: Math.random() * innerWidth, 5 y: Math.random() * innerHeight, 6})); 7 8// width + height set an extent on the voronoi 9// x + y set relevant accessors depending on the shape of your data 10const voronoiLayout = voronoi({ 11 x: d => d.x, 12 y: d => d.y, 13 width, 14 height, 15}); 16 17const voronoiDiagram = voronoiLayout(data); 18const polygons = voronoiDiagram.polygons(); // equivalent to voronoiLayout.polygons(points) 19 20return ( 21 <svg> 22 <Group> 23 {polygons.map((polygon) => ( 24 <VoronoiPolygon key={...} polygon={polygon} /> 25 ))} 26 {points.map(({ x, y }) => ( 27 <circle key={...} cx={x} cy={y} /> 28 )} 29 </Group> 30 </svg> 31)
For more advanced usage with events, see this example. Additional information about the voronoi layout + diagram can be found in the d3-voronoi documentation.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
security policy file detected
Details
Reason
Found 11/30 approved changesets -- score normalized to 3
Reason
0 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 1
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
92 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More