# SankeyChartProps (@salmonui/charts/sankey-chart)

> The SankeyChartProps interface of @salmonui/charts/sankey-chart.

Canonical: https://salmonui.dev/docs/reference/charts/sankey-chart/SankeyChartProps

```ts
import type { SankeyChartProps } from '@salmonui/charts/sankey-chart';
```

Entry index: https://salmonui.dev/docs/reference/charts/sankey-chart (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/charts/sankey-chart.md).

## Reference

Kind: interface

```ts
interface SankeyChartProps {
    readonly nodes: readonly SankeyNode[];
    readonly links: readonly SankeyLink[];
    readonly orientation?: 'horizontal' | 'vertical' | undefined;
    readonly nodeWidth?: number | undefined;
    readonly nodePadding?: number | undefined;
    readonly linkColor?: 'source' | 'target' | 'gradient' | undefined;
    readonly curvature?: number | undefined;
    readonly labels?: boolean | {
        readonly position?: 'inside' | 'outside' | undefined;
    } | undefined;
    readonly legend?: boolean | {
        readonly position?: 'top' | 'bottom' | 'start' | 'end' | undefined;
        readonly title?: string | undefined;
    } | undefined;
    readonly tooltip?: boolean | {
        readonly renderNode?: ((node: SankeyNodeInfo) => ReactNode) | undefined;
        readonly renderLink?: ((link: SankeyLinkInfo) => ReactNode) | undefined;
    } | undefined;
    readonly highlight?: 'adjacent' | false | undefined;
    readonly onNodeClick?: ((node: SankeyNodeInfo, event: SankeyEvent) => void) | undefined;
    readonly onLinkClick?: ((link: SankeyLinkInfo, event: SankeyEvent) => void) | undefined;
    readonly onNodeHover?: ((node: SankeyNodeInfo | null) => void) | undefined;
    readonly onLinkHover?: ((link: SankeyLinkInfo | null) => void) | undefined;
    readonly getNodeStyle?: ((node: SankeyNodeInfo) => {
        readonly color?: string | undefined;
    } | undefined) | undefined;
    readonly getLinkStyle?: ((link: SankeyLinkInfo) => {
        readonly color?: string | undefined;
        readonly opacity?: number | undefined;
    } | undefined) | undefined;
    readonly formatLabel?: ((node: SankeyNodeInfo) => string) | undefined;
    readonly format?: Intl.NumberFormatOptions | ((value: number) => string) | undefined;
    readonly locale?: string | undefined;
    readonly text?: Partial<SankeyChartText> | undefined;
    readonly width?: number | undefined;
    readonly height?: number | undefined;
    readonly title?: string | undefined;
    readonly subtitle?: string | undefined;
    readonly description?: string | undefined;
    readonly showDataTable?: boolean | undefined;
    readonly className?: string | undefined;
    readonly style?: CSSProperties | undefined;
    readonly id?: string | undefined;
    readonly ref?: Ref<SankeyChartApi> | undefined;
    readonly onResize?: ((size: {
        readonly width: number;
        readonly height: number;
    }) => void) | undefined;
    readonly animated?: boolean | undefined;
}
```

Members (33):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `nodes` | `readonly nodes: readonly SankeyNode[];` |  |  |
| `links` | `readonly links: readonly SankeyLink[];` |  |  |
| `orientation` | `readonly orientation?: 'horizontal' \| 'vertical' \| undefined;` | optional |  |
| `nodeWidth` | `readonly nodeWidth?: number \| undefined;` | optional | Node thickness across the flow, px. Default 16. |
| `nodePadding` | `readonly nodePadding?: number \| undefined;` | optional | Gap between nodes in a column, px. Default 12. |
| `linkColor` | `readonly linkColor?: 'source' \| 'target' \| 'gradient' \| undefined;` | optional | Link color: the source or target node color, or a gradient between them. Default `source`. |
| `curvature` | `readonly curvature?: number \| undefined;` | optional | 0 (straight) .. 1. Default 0.5. |
| `labels` | `readonly labels?: boolean \| {     readonly position?: 'inside' \| 'outside' \| undefined; } \| undefined;` | optional |  |
| `legend` | `readonly legend?: boolean \| {     readonly position?: 'top' \| 'bottom' \| 'start' \| 'end' \| undefined;     readonly title?: string \| undefined; } \| undefined;` | optional |  |
| `tooltip` | `readonly tooltip?: boolean \| {     readonly renderNode?: ((node: SankeyNodeInfo) => ReactNode) \| undefined;     readonly renderLink?: ((link: SankeyLinkInfo) => ReactNode) \| undefined; } \| undefined;` | optional |  |
| `highlight` | `readonly highlight?: 'adjacent' \| false \| undefined;` | optional | Dim everything not connected to the hovered or focused node or link. Default `adjacent`. |
| `onNodeClick` | `readonly onNodeClick?: ((node: SankeyNodeInfo, event: SankeyEvent) => void) \| undefined;` | optional |  |
| `onLinkClick` | `readonly onLinkClick?: ((link: SankeyLinkInfo, event: SankeyEvent) => void) \| undefined;` | optional |  |
| `onNodeHover` | `readonly onNodeHover?: ((node: SankeyNodeInfo \| null) => void) \| undefined;` | optional |  |
| `onLinkHover` | `readonly onLinkHover?: ((link: SankeyLinkInfo \| null) => void) \| undefined;` | optional |  |
| `getNodeStyle` | `readonly getNodeStyle?: ((node: SankeyNodeInfo) => {     readonly color?: string \| undefined; } \| undefined) \| undefined;` | optional |  |
| `getLinkStyle` | `readonly getLinkStyle?: ((link: SankeyLinkInfo) => {     readonly color?: string \| undefined;     readonly opacity?: number \| undefined; } \| undefined) \| undefined;` | optional |  |
| `formatLabel` | `readonly formatLabel?: ((node: SankeyNodeInfo) => string) \| undefined;` | optional |  |
| `format` | `readonly format?: Intl.NumberFormatOptions \| ((value: number) => string) \| undefined;` | optional |  |
| `locale` | `readonly locale?: string \| undefined;` | optional |  |
| `text` | `readonly text?: Partial<SankeyChartText> \| undefined;` | optional | Built-in text (over the nearest `LocaleProvider`'s `sankeyChart` entry). |
| `width` | `readonly width?: number \| undefined;` | optional |  |
| `height` | `readonly height?: number \| undefined;` | optional |  |
| `title` | `readonly title?: string \| undefined;` | optional |  |
| `subtitle` | `readonly subtitle?: string \| undefined;` | optional |  |
| `description` | `readonly description?: string \| undefined;` | optional |  |
| `showDataTable` | `readonly showDataTable?: boolean \| undefined;` | optional |  |
| `className` | `readonly className?: string \| undefined;` | optional |  |
| `style` | `readonly style?: CSSProperties \| undefined;` | optional |  |
| `id` | `readonly id?: string \| undefined;` | optional |  |
| `ref` | `readonly ref?: Ref<SankeyChartApi> \| undefined;` | optional |  |
| `onResize` | `readonly onResize?: ((size: {     readonly width: number;     readonly height: number; }) => void) \| undefined;` | optional |  |
| `animated` | `readonly animated?: boolean \| undefined;` | optional | Entrance and update transitions, default `true`: client only (never in server markup), off under `prefers-reduced-motion`. The CSS is the opt-in `@salmonui/charts/viz-animations.css`. |
