From a3fa48732a96ec18fea6419886547c648673ccef Mon Sep 17 00:00:00 2001 From: Usman Baig Date: Thu, 12 Mar 2026 23:20:33 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20correct=20ribbon=20y-offset=20=E2=80=94?= =?UTF-8?q?=20d3-sankey=20y0/y1=20are=20center,=20not=20top?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/journeys/SankeyDiagram.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 [