Published
Edited
Nov 21, 2019
Insert cell
Insert cell
html`<div id="example">Ejemplo <p style="background-color:gray; color:#EEE">Default element</p></div>`
Insert cell
data = "Lorem ipsum dolor sit amet".split(" ")
Insert cell
d3 = require("d3@5")
Insert cell
Insert cell
d3.select("#example")
.html("new example")
.style("background-color","steelblue")
.style("color", "white")
.attr("style", "background-color:red;color:blue")
Insert cell
Insert cell
sel = d3.select("#example").selectAll("p").data(data)
Insert cell
sel.enter()
.append("p")
.style("background-color","yellow")
.style("color", "black")
.html(d=>d)
Insert cell
sel
//.append("p")
.style("background-color","blue")
.style("color", "white")
.html(d=>d)
Insert cell
sel.exit()
//.append("p")
.style("background-color","black")
.style("color", "white")
.html(d=>d)
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