Public
Edited
Apr 12, 2023
1 fork
Insert cell
Insert cell
Insert cell
{
const canvas = html`<canvas width = 300 height = 300 style = "border:1px solid black;"/>`
const ctx = canvas.getContext("2d")
ctx.fillStyle = "steelblue"
ctx.strokeStyle = "red"
ctx.beginPath()
ctx.rect(150,150,50,50)
ctx.fill()
ctx.stroke()
ctx.closePath()
return canvas
}
Insert cell
{
const canvas = html`<canvas width = 300 height = 300 style = "border:1px solid black;"/>`
const ctx = canvas.getContext("2d")
ctx.fillStyle = "steelblue"
ctx.strokeStyle = "red"
ctx.beginPath()
ctx.moveTo(100,0)
ctx.lineTo(150,150)
ctx.fill()
ctx.stroke()
ctx.closePath()
return 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