Published
Edited
Nov 20, 2019
Insert cell
Insert cell
{
const body = html`<div></div>`
let div = d3.select(body)
.selectAll("div")
.data([4, 8, 15, 16, 23, 42])
.enter().append("div")
.text(d => d);
div = div.data([1, 2, 4, 8, 16, 32], d => d);
div.enter().append("div").text(d => d);
div.exit().remove(); // remove the exit selection
return body
}

Insert cell
{
const body = html`<div></div>`
let div = d3.select(body)
.selectAll("div")
.data([4, 8, 15, 16, 23, 42])
.enter().append("div")
.text(d => d);
div = div.data([1, 2, 4, 8, 16, 32], d => d);
div.enter().append("div").text(d => d);
return div.exit().remove(); // remove the exit selection
// return body
}

Insert cell
Insert cell
import { d3 } from "@embracelife/tutorial-utilities"
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