Published
Edited
Sep 4, 2018
Insert cell
Insert cell
Insert cell
Insert cell
svg = {
const r = 50, m = 2, size = 2 * (r + 2*m);
const svg = d3.select(DOM.svg(size, size));
svg.append('circle')
.attr('r', r)
.attr('cx', r + m)
.attr('cy', r + m)
.style('stroke', 'black')
.style('stroke-width', `${m}px`) // m = margin
.style('fill', 'red')
.append('title')
.text('This is our circle :)');
return svg;
}
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