Public
Edited
Dec 1, 2023
Insert cell
Insert cell
{
let height = width / 1.5;
let canvas = DOM.canvas(width, height);
let ps = new paper.PaperScope();
ps.setup(canvas);
canvas.ps = ps;
let rectangle = new ps.Rectangle(
new ps.Point(100, 100),
new ps.Size(100, 100)
);
var path = new ps.Path.Rectangle(rectangle, 10);
path.opacity = 0.2;
path.fillColor = color;
return canvas;
}
Insert cell
viewof color = DOM.input("color")
Insert cell
paper = require("paper")
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