Public
Edited
Feb 22, 2020
1 fork
Insert cell
Insert cell
{
for (const dy of [.3, .4, .5, .6]) {
const y = dy * height
// const data = generate(y, y + 50, 30, 25);
svg.append('path')
// .attr('d', `M0,${height} ${data.map((y, i) => `${i / data.length * width},${y}`)} ${width},${y} ${width},${height} Z`)
.attr('d', `M0,${height} L0,${y} ${[...points(50, y, 50)].map(([x,y]) => `L${x * width},${y}`).join(' ')} L${width},${height} Z`)
.attr('fill', 'tomato')
.attr('opacity', .3)
}
return svg.node()
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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