diff --git a/components/journeys/SankeyDiagram.tsx b/components/journeys/SankeyDiagram.tsx index 77e3ba9..e7b4f0e 100644 --- a/components/journeys/SankeyDiagram.tsx +++ b/components/journeys/SankeyDiagram.tsx @@ -117,9 +117,10 @@ function ribbonPath(link: LayoutLink): string { const tgt = link.target as LayoutNode const sx = src.x1! const tx = tgt.x0! - const sy = link.y0! - const ty = link.y1! const w = link.width! + // d3-sankey y0/y1 are the CENTER of the link band, not the top + const sy = link.y0! - w / 2 + const ty = link.y1! - w / 2 const mx = (sx + tx) / 2 return [