Public
Edited
Mar 27
2 forks
Insert cell
Insert cell
{
const size = 640;
const circles = [];

drawCircle(size / 2, size / 2, 300);

function drawCircle(x, y, r) {
if (r < 4) return;
circles.push({ x, y, r });
drawCircle(x, y, r * 0.75);
}

const app = cm.app({
width: size,
height: size,
draw: [
cm.svg("circle", circles, {
cx: (d) => d.x,
cy: (d) => d.y,
r: (d) => d.r,
stroke: "black",
fill: "white",
strokeWidth: 2
})
]
});

return app.render();
}
Insert cell
cm = require("charmingjs@0.0.15")
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