Public
Edited
Apr 27, 2023
Insert cell
data = [2, 3, 10, 23, 3, 4]
Insert cell
{
const width = 400;
const height = 500;

var container = d3.create("svg")
.attr("width", width)
.attr("height", height)

var circles = container.selectAll("circle")
.data(data)
.enter()
.append("circle")

circles.attr("cx", function (d, i) {
return (i * 50) + 25;
})
.attr("cy", height/2)
.attr("r", function(d){
return 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