Skip to content

Commit b7387d3

Browse files
committed
Update SankeyDiagram component to adjust link and node dimensions
This commit modifies the MAX_LINK_HEIGHT constant to 56 and updates the nodeGap, minHeight, and verticalPadding values for improved layout and spacing in the SankeyDiagram component. These changes enhance the visual representation of the diagram, ensuring better usability and aesthetics.
1 parent b6feddb commit b7387d3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

client/src/app/[site]/journeys/components/SankeyDiagram.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { useTheme } from "next-themes";
55
import { useEffect, useRef } from "react";
66

77
const MIN_LINK_HEIGHT = 0;
8-
const MAX_LINK_HEIGHT = 100;
8+
const MAX_LINK_HEIGHT = 56;
99
const MIN_NODE_HEIGHT = 2;
1010

1111
interface Journey {
@@ -110,9 +110,9 @@ export function SankeyDiagram({ journeys, steps, maxJourneys, domain }: SankeyDi
110110
const width = containerWidth;
111111
const stepWidth = width / steps;
112112
const stepSpacing = stepWidth - nodeWidth;
113-
const nodeGap = 20; // Gap between nodes
114-
const minHeight = 200;
115-
const verticalPadding = 10;
113+
const nodeGap = 10;
114+
const minHeight = 160;
115+
const verticalPadding = 6;
116116

117117
// Calculate the total height needed for each step column
118118
const stepHeights = Array.from(nodesByStep.values()).map(stepNodes => {

0 commit comments

Comments
 (0)