Published
Edited
May 11, 2021
1 fork
2 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function linkArc(d) {
const r = Math.hypot(d.target.x - d.source.x, d.target.y - d.source.y);
const startx = d.source.x + ((d.target.x - d.source.x) * (bubbleSize/r))
const starty = d.source.y + ((d.target.y - d.source.y) * (bubbleSize/r))
const endx = d.target.x + ((d.source.x - d.target.x) * (bubbleSize/r))
const endy = d.target.y + ((d.source.y - d.target.y) * (bubbleSize/r))
return `
M${startx},${starty}
A${r},${r} 0 0,1 ${endx},${endy}
`;
}
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