Nearest-site regions of a set of points: the plot is split into one region per site, each region being every spot that is closer to its site than to any other site (a catchment or service area: which store, depot, sensor or office is nearest). Regions come from a Delaunay triangulation and its Voronoi cells (d3-delaunay, with delaunator and robust-predicates), clipped to the sites' extent plus a margin, with nice axis ticks in the data's own units. Each region is filled with a light colour by group (a legend names every group, never colour alone) or with one light fill and a visible outline when there are no groups; the site is a dot, and its label sits under the dot when the region is wide enough for it (otherwise the label is hidden; the full label is in the region's tooltip and in the table). Static SVG, no script, scaled to its container. The hidden table lists every site with x, y, group, value and its share of the area. The aria label gives the number of sites, the number of groups and the site with the largest region. Motion-ready: each region reads --p through a --k so a motion_timeline track on p fades the regions in one after another; the standalone render is the finished picture.
| Surface | Note |
|---|---|
| Prints the finished picture; no motion |
| Field | Type | Required |
|---|---|---|
| title | string (optional, max 80). | optional |
| sites | array (required, 3 to 200) of {x, y (numbers, required), label (optional, max 24), group (optional, max 20), value (optional number)}. A site whose position equals an earlier site's is merged into the first, with a note. An entry that is not an object with finite numeric x and y (or beyond 1e12) is left out and counted in a note; entries beyond the first 200 are noted and not used; fewer than 3 sites at different positions gets a note instead of the chart. A label or group that is a number is shown as that number; a list, object or boolean is no text (the site is called "Site 1", "Site 2" ... by its place in the list, and has no group). value is shown in the table and in the region's tooltip only, never drawn. | optional |
| x_label | string (optional, max 30). Under the plot. | optional |
| y_label | string (optional, max 30). Above the plot. | optional |
| unit | string (optional, max 12). Appended to the values in the table and the tooltips. | optional |
| version | integer (optional, default 1). The voronoi contract the payload was written for. Only version 1 exists; a higher whole number is drawn as version 1 with a note. | optional |
{
"type": "voronoi"
}
{
"identifier": "urn:air:a2uicatalog.ai:atom:voronoi",
"displayName": "Voronoi",
"type": "application/vnd.a2ui.atom+json",
"url": "https://a2uicatalog.ai/atoms/voronoi",
"capabilities": [
"web",
"google-apps-script-web",
"mcp-apps",
"android"
],
"description": "Nearest-site regions of a set of points: the plot is split into one region per site, each region being every spot that is closer to its site than to any other site (a catchment or service area: which store, depot, sensor or office is nearest). Regions come from a Delaunay triangulation and its Voronoi cells (d3-delaunay, with delaunator and robust-predicates), clipped to the sites' extent plus a margin, with nice axis ticks in the data's own units. Each region is filled with a light colour by group (a legend names every group, never colour alone) or with one light fill and a visible outline when there are no groups; the site is a dot, and its label sits under the dot when the region is wide enough for it (otherwise the label is hidden; the full label is in the region's tooltip and in the table). Static SVG, no script, scaled to its container. The hidden table lists every site with x, y, group, value and its share of the area. The aria label gives the number of sites, the number of groups and the site with the largest region. Motion-ready: each region reads --p through a --k so a motion_timeline track on p fades the regions in one after another; the standalone render is the finished picture.",
"representativeQueries": [
"show a voronoi: nearest-site regions of a set of points (catchments, service areas)",
"nearest-site regions of a set of points: the plot is split into one region per site, each region bei",
"render a voronoi"
]
}
The renderer is an open-source Google Apps Script web app. Deploy your own instance in 4 commands — you own the URL, no dependency on the demo endpoint.
git clone https://github.com/a2uicatalog/a2ui
cd a2ui/apps-script-surface/gas-wired-renderer
clasp push && clasp deploy
Full deploy guide →