ValyroUI Русская версия

Sankey Chart

Flow diagrams between stages. Pro · Charts and analytics › Shares and composition

Installation

npx valyro-cli@latest login
npx valyro-cli@latest add sankey-chart
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { SankeyChart } from 'valyro-ui-pro';

Props

PropTypeDefault
nodes *SankeyNode[]Nodes referenced by link ids; a node's height follows its larger of inflow and outflow, unlinked nodes are hidden.
links *SankeyLink[]Flows between nodes. Links that would close a cycle are not drawn.
heightnumber360Plot height in px; width follows the container. Default 360.
nodeWidthnumberWidth of a node bar in px. Default: the theme's --ui-sankey-chart-node-w (10 in Vercel, 14 in Glass).
nodePaddingnumber16Vertical gap between nodes in px (less when a column is crowded). Default 16.
align'justify' | 'left''justify'justify puts nodes without outflow in the last column; left keeps them at their depth.
valueFormatterValueFormatterFormats node and link values in labels, the tooltip and the data table.
localestringBCP 47 locale for the default number formatting. Default: the ThemeProvider locale, then the browser's.
labelsPartial<SankeyChartLabels>Overrides for the built-in strings.
loadingbooleanfalseShows a placeholder of the same height while data loads.
ariaLabel *stringAccessible name of the chart (also the caption of its sr-only data table).

Related components

Previous: Funnel Chart · Next: Radar Chart · All Charts and analytics