Voronoi
Each point's Voronoi cell, as triangles for Polygon.
Static preview; loading the interactive plot
<script>
import { Plot, Voronoi, Polygon } from "hmplot";
const data = { name: ["a", "b", "c", "d", "e"], x: [1, 3, 2, 4, 2.5], y: [1, 1, 3, 3, 2] };
</script>
<Plot {data} height={300} axes2d>
<Voronoi x="x" y="y">
<Polygon fill="name" />
</Voronoi>
</Plot>
Usage
Voronoi makes each point’s cell, clipped to extent (default: the points’ bounds and a tenth around them), as triangles for Polygon. Each cell’s triangles carry its point’s row, so hovering a cell highlights its point.