Published
Edited
Aug 23, 2020
Fork of Template
Insert cell
Insert cell
svg = {
const svg = html`<svg id = "svg"></svg>`
const container = d3.select(svg)
for(let i = 0; i < 100; i = i + 1){
container.append("circle")
.attr("fill","cornflowerblue")
.attr("stroke","black")
.attr("opacity",.5)
.attr("cx",data[i].x)
.attr("cy",data[i].y)
.attr("r",data[i].r)
}
return svg
}
Insert cell
data = {
const data = []
for(let i = 0; i < 100; i = i + 1){
data.push({x:Math.random()*600, y:Math.random()*300, r:Math.random()*10})
}
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