Skip to main content

sankey_link_path

Function sankey_link_path 

Source
pub fn sankey_link_path(
    source: &SankeyNodeLayout,
    target: &SankeyNodeLayout,
    link: &SankeyLinkLayout,
    min_width: f32,
    origin: Point<Pixels>,
) -> Option<Path<Pixels>>
Expand description

Build the filled ribbon path for a link — the equivalent of d3-sankey’s sankeyLinkHorizontal(): a horizontal cubic bezier with control points at the horizontal midpoint, thickened to the per-end link widths (clamped to min_width so tiny flows stay visible).