Published
Edited
Feb 12, 2020
5 forks
21 stars
Insert cell
Insert cell
Insert cell
Insert cell
p = getRandomPalette()
Insert cell
palette = shuffle(p)
Insert cell
Insert cell
svg`<svg width="${w}" height="${h}">
<rect x="0" y="0" width="${w}" height="${h}" stroke="none" fill="${palette[0]}"></rect>
${array(500).map(i => `<circle
transform="translate(${w / 2}, ${h / 2}) rotate(${randInt(360)})"
cx="0"
cy="0"
r="${50 + i * 3}"
fill="none"
stroke="${palette[randInt(1, palette.length)]}"
stroke-width="${randInt(2, 32)}"
stroke-dasharray="${array(200).map(() => randInt(800)).join(' ')}"
/>`).join('\n')}

${array(500).map(i => `<circle
transform="translate(${w / 2}, ${h / 2}) rotate(${randInt(360)})"
cx="0"
cy="0"
r="${30 + i * 3}"
fill="none"
stroke="${palette[randInt(1, palette.length)]}"
stroke-width="${randInt(5 + i / 3)}"
stroke-dasharray="${array(200).map(j => (j % 2 == 1) ? randInt(100) : randInt(1, 6)).join(' ')}"
/>`).join('\n')}
</svg>`
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