Published
Edited
Aug 23, 2020
1 star
Insert cell
Insert cell
Insert cell
Insert cell
arr = {
const out = [];
let n = 0;
while (true) {
++n;
out.push([n, Math.pow(1 + 1 / n, n)]);
yield Promises.delay(100, out);
}
}
Insert cell
x = d3.scaleLinear()
.domain([0, arr[arr.length - 1][0]])
.range([0, chartWidth])
Insert cell
y = d3.scaleLinear()
.domain([2, 3])
.range([chartHeight, 0])
Insert cell
line = d3.line()
.x(d => x(d[0]))
.y(d => y(d[1]));
Insert cell
chartWidth = Math.min(400, width) - margin.left - margin.right;
Insert cell
chartHeight = Math.min(400, width) - margin.top - margin.bottom;
Insert cell
margin = ({left: 30, right: 10, top: 20, bottom: 20});
Insert cell
d3 = require("d3@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