Public
Edited
Apr 17, 2023
Fork of Blog Post
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
{
const myWidth = Math.max(640, width);
const ctx = DOM.context2d(myWidth, 100);
ctx.strokeStyle = '#959';
while (true) {
ctx.clearRect(0, 0, myWidth, 100);
ctx.beginPath();
for (let i = 0; i < myWidth; i += 2) {
ctx[i ? 'lineTo' : 'moveTo'](i, 50 +
Math.cos((Date.now() / 2000) - i / 5) *
Math.cos((Date.now() / 2000) - i / 20) * 20);
}
ctx.stroke();
yield ctx.canvas;
}
}
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