MAIDR Documentation - v4.4.0
    Preparing search index...

    Configuration for a flow diagram. Required when chartType is 'alluvial' or 'sankey'.

    The data array is the links half of what Recharts' <Sankey> is given: one row per flow. xKey names the field holding the source node and the single yKeys entry the field holding the magnitude, so only the target needs a key of its own.

    interface FlowLinkConfig {
        targetKey: string;
        nodes?: Record<string, unknown>[];
        nodeNameKey?: string;
    }
    Index

    Properties

    targetKey: string

    Key in link objects for the node the flow arrives at.

    nodes?: Record<string, unknown>[]

    The nodes half of the <Sankey> data, used to resolve the numeric indices Recharts links carry into node names.

    Recharts addresses nodes by their position in this array, and an index is not something to announce — "flow from 3 to 7" names neither end. Omit it only when the links already carry node names.

    nodeNameKey?: string

    Key in node objects for the node's name. Mirrors <Sankey nameKey>, and defaults to 'name'.