Published
Edited
Jun 11, 2020
1 fork
Importers
3 stars
Insert cell
Insert cell
Insert cell
Insert cell
colors = ["#00441b", "#238b45", "#66c2a4", "#ccece6", "#fff"];
Insert cell
values = [0, 20, 100, 600, 1200]
Insert cell
// One more number than color
scale = d3.scaleColor()
.colors(["#00441b", "#238b45", "#66c2a4", "#ccece6"])
.values(values);
Insert cell
scaleGradient = d3.scaleColor()
.colors(["#00441b", "#238b45", "#66c2a4", "#ccece6", "#fff"])
.values(values)
.gradient(true);
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