Published
Edited
Aug 23, 2020
Insert cell
Insert cell
svg = {
const svg = html`<svg id = "svg"></svg>`
const container = d3.select(svg)
for(let i = 0; i < 50; i = i + 1){
container.append("circle")
.attr("cy",150)
.attr("r",10)
.attr("cx",data[i])
}

return svg
}
Insert cell
data = {
const data = []
for(let i = 0; i < 50; i = i + 1){
data.push(Math.random()*600)
}
return data
}
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