sankeyRight function

int sankeyRight(
  1. SankeyNode node,
  2. int n
)

Positions the node at the right side of the diagram by subtracting its height from the total number of columns

This alignment is equivalent to the d3‑sankey "right" alignment

Implementation

int sankeyRight(SankeyNode node, int n) => n - 1 - node.height;