Published
Edited
Jan 17, 2020
8 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function draw(d, i) {
var path = document.getElementById("loop");
var length = path.getTotalLength();
var l = (length * i) / arrowCount,
angle = angleAtLength(l, path),
point = pointAtLength(l, path);

point[0] = point[0] + 6 * Math.cos(angle - Math.PI / 2);
point[1] = point[1] + 6 * Math.sin(angle - Math.PI / 2);
d3.select(this).attr(
"transform",
"translate(" + point + ") rotate(" + (angle * 180) / Math.PI + ")"
);
}
Insert cell
Insert cell
Insert cell
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