import type { DataItem } from "../../core/render/Component"; import { Flow, IFlowSettings, IFlowDataItem, IFlowPrivate, IFlowEvents } from "./Flow"; import { SankeyNodes, ISankeyNodesDataItem } from "./SankeyNodes"; import { SankeyLink } from "./SankeyLink"; import { ListTemplate } from "../../core/util/List"; import * as d3sankey from "d3-sankey"; import type { Bullet } from "../../core/render/Bullet"; export interface ISankeyDataItem extends IFlowDataItem { /** * The link element. */ link: SankeyLink; /** * Source node data item. */ source: DataItem; /** * Target node data item. */ target: DataItem; } export interface ISankeySettings extends IFlowSettings { /** * Direction of the flow: `"horizontal"` from left to right, `"vertical"` * from top to bottom. * * @default "horizontal" */ orientation?: "horizontal" | "vertical"; /** * How nodes are spread across the columns. `"left"` puts each node in the * earliest column its links allow, `"right"` in the latest. `"justify"` is * like `"left"`, but moves nodes with no outgoing links to the last column; * `"center"` is like `"left"`, but moves nodes with no incoming links to * the column just before their nearest target. * * @default "justify" */ nodeAlign?: "left" | "right" | "justify" | "center"; /** * Tension of the link curves, from `0` to `1`. `1` makes the links * straight between their bend points. * * @default 0.5 */ linkTension?: number; /** * A custom function to use when sorting nodes. * * @todo test * @ignore */ nodeSort?: (a: d3sankey.SankeyNodeMinimal<{}, {}>, b: d3sankey.SankeyNodeMinimal<{}, {}>) => number | null; /** * Function that orders the links where they meet a node. `null` keeps the * order of the data; when not set, links are ordered by the position of * the node at their other end. * * @since 5.4.4 */ linkSort?: null | ((a: d3sankey.SankeyLinkMinimal<{}, {}>, b: d3sankey.SankeyLinkMinimal<{}, {}>) => number | null); } export interface ISankeyPrivate extends IFlowPrivate { } export interface ISankeyEvents extends IFlowEvents { } /** * Sankey diagram: nodes in columns, linked by bands as wide as the values * they carry. * * @see {@link https://www.amcharts.com/docs/v5/charts/flow-charts/} for more information * @important */ export declare class Sankey extends Flow { static className: string; static classNames: Array; /** * List of link elements; configure them all through `links.template`. */ readonly links: ListTemplate; protected _afterNew(): void; /** * The series that holds the diagram's nodes. */ readonly nodes: SankeyNodes; _settings: ISankeySettings; _privateSettings: ISankeyPrivate; _dataItemSettings: ISankeyDataItem; _events: ISankeyEvents; _d3Sankey: d3sankey.SankeyLayout, {}, {}>; _d3Graph: d3sankey.SankeyGraph<{}, {}> | undefined; _fillGenerator: import("d3-shape").Area<[number, number]>; _strokeGenerator: import("d3-shape").Line<[number, number]>; /** * @ignore */ makeLink(dataItem: DataItem): SankeyLink; /** * @ignore */ updateSankey(): void; _updateLinkColor(dataItem: DataItem): void; protected _getBulletLocation(bullet: Bullet): number; _prepareChildren(): void; } //# sourceMappingURL=Sankey.d.ts.map