Published
Edited
Mar 14, 2022
Insert cell
Insert cell
Insert cell
Insert cell
chart = {
const svg = d3
.create("svg")
.attr("width", width)
.attr("height", height)
.style("background", "aliceblue");

// Paint Path
const path = d3.path();
path.moveTo(10, 10); // move current point to ⟨10,10⟩
path.quadraticCurveTo(30, 10, 30, 30);
path.lineTo(30, 500);

const d = path.toString();
console.log(d);

svg
.append("path")
.attr("stroke", "red")
.attr("stroke-width", "5")
.attr("fill", "none")
.attr("d", d);

return svg.node();
}
Insert cell
md`### Helpers`
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