Published
Edited
Apr 29, 2020
1 fork
Insert cell
Insert cell
{
const svg = d3.create("svg").attr("viewBox", [0, 0, width, 100]);
yield svg.node();

svg.call(d3.renderSelection, [
{ append: "rect", fill: "pink", x: 0, width: 100, height: 100 },
{ append: "rect", fill: "blue", x: 100, width: 100, height: 100 },
{ append: "rect", fill: "green", x: 200, width: 100, height: 100 }
]);
}
Insert cell
d3 = require("d3@5", "d3-render@0.1.5")
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