Published
Edited
Oct 12, 2019
Insert cell
Insert cell
points = [[0, 0], [0, 100], [100, 0], [10, 10]]
Insert cell
delaunay = d3.Delaunay.from(points)
Insert cell
delaunay.render()
Insert cell
voronoi = delaunay.voronoi([0, 0, 50, 50])
Insert cell
svg
.append("path")
.attr("fill", "none")
.attr("stroke", "#67A9CF")
.attr("stroke-width", 1)
.attr("d", delaunay.render())
Insert cell
svg
.append("path")
.attr("fill", "none")
.attr("stroke", "#ef6548")
.attr("stroke-width", 1)
.attr("d", voronoi.render())
Insert cell
Insert cell
Insert cell
Insert cell
d3 = require("d3@5", "d3-delaunay@5")
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more