Published
Edited
Jun 25, 2020
Insert cell
Insert cell
Insert cell
Insert cell
pack = data => d3.pack()
.size([width, height])
.padding(3)
(d3.hierarchy(data)
.sum(d => d.value)
.sort((a, b) => b.value - a.value))
Insert cell
width = 932
Insert cell
height = width
Insert cell
format = d3.format(",d")
Insert cell
color = d3.scaleLinear()
.domain([0, 5])
.range(["hsl(41.2, 43.8%, 70%)", "hsl(0, 0%, 0%)"])
.interpolate(d3.interpolateHcl)
Insert cell
d3 = require("d3@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