Published
Edited
Jul 30, 2018
4 stars
Insert cell
Insert cell
Two = require("two.js")
Insert cell
two = new Two({
width: width,
height: height,
antialias: true,
preserveDrawingBuffer: false,
type: Two.Types[type]
}).appendTo(((container.innerHTML = ""), container))
Insert cell
Insert cell
Insert cell
MAIN = {
yield "—";
two.clear();
voronoi.polygons.forEach((p, i) => {
p = two.makePath(p.map(d => new Two.Anchor(...d)));
p.fill = scheme[i % scheme.length];
p.stroke = p.fill;
});
two.update();
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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