Are you an AI agent?

SankeyTooltip

import { SankeyTooltip } from '@wick-charts/react';
 
<SankeyTooltip seriesId='flow'>
{({ info, format }) => (
<div>{info.label}: {format(info.value)}</div>
)}
</SankeyTooltip>

Tooltip for sankey charts. Shows the hovered node (label) or link (Source → Target), its value, and its share of the outflow: of all sources for a node, of the source node for a link.

Hover tooltip for <SankeySeries>. Shows the hovered node (or Source → Target for a link), its value, and its share of the outflow — of all source nodes for a node, of the source node for a link. The render-prop exposes the hover info and the formatter.

Props

seriesId?string

Owning series id. Optional — when omitted, the first visible sankey series is picked.

format?default plain integersValueFormatter

Custom formatter for the flow value. Default: plain integers, compact decimals.

children?(ctx: SankeyTooltipRenderContext) => ReactNode

Render-prop escape hatch — receives hover info + format, replaces default UI.

Render prop

// children: (ctx: SankeyTooltipRenderContext) => ReactNode
<SankeyTooltip>
{({ info, format }) => (
<div>{info.label}: {format(info.value)}</div>
)}
</SankeyTooltip>