Published
Edited
Nov 19, 2019
Insert cell
Insert cell
d3.selectAll("p")
.attr("style", "color: red")
.append("div"); // return a selection of divs
Insert cell
d3.selectAll("p").append(() => document.createElement("h1")); // or use (d, i, nodes)
Insert cell
d3.selectAll("p").select(function(d, i, nodes) {
return (i % 2 === 0) ? this.appendChild(document.createElement("a")): null;
});
Insert cell
import { d3 } from "@embracelife/tutorial-utilities"
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