Published
Edited
Nov 8, 2019
1 fork
Insert cell
md`# D3 Tutorial 14-1`
Insert cell
dataset = [
[5, 20], [480, 90], [250, 50], [100, 33], [330, 95],
[410, 12], [475, 44], [25, 67], [85, 21], [220, 88]
];
Insert cell
w = 500
Insert cell
h = 100
Insert cell
svg = {
const svg = DOM.svg(w, h)
d3.select(svg).selectAll("circle")
.data(dataset)
.enter()
.append("circle")
.attr("cx", function(d) {
return d[0];
})
.attr("cy", function(d) {
return d[1];
})
.attr("r", 5);
return svg
}
Insert cell
style = html`<style>
</style>`
Insert cell
d3 = require('d3@5')
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