import type { DataItem } from "../../core/render/Component"; import type { IPoint } from "../../core/util/IPoint"; import { LinkedHierarchy, ILinkedHierarchyPrivate, ILinkedHierarchySettings, ILinkedHierarchyDataItem, ILinkedHierarchyEvents } from "./LinkedHierarchy"; import * as d3hierarchy from "d3-hierarchy"; export interface ITreeDataObject { name?: string; value?: number; children?: ITreeDataObject[]; dataItem?: DataItem; } export interface ITreeDataItem extends ILinkedHierarchyDataItem { /** * An array of children data items. */ children: Array>; /** * Parent data item. * @type {DataItem} */ parent: DataItem; } export interface ITreeSettings extends ILinkedHierarchySettings { /** * Orientation of the diagram. * * @default "vertical" */ orientation?: "horizontal" | "vertical"; /** * If set to `true`, will flip the tree direction. * * @default false * @since 5.2.4 */ inversed?: boolean; /** * If set to `true`, will use cluster layout (dendrogram) where all leaf * nodes are placed at the same depth. * * @default false * @since 5.16.2 */ clustered?: boolean; /** * A function that returns the desired separation between neighboring * nodes. Receives two data items and should return a numeric value. * * Default is `1` for siblings, `2` for non-siblings. * * Can be used to create variable node spacing based on value, label * size, or other data properties. * * @since 5.16.2 */ nodeSeparation?: (a: DataItem, b: DataItem) => number; } export interface ITreePrivate extends ILinkedHierarchyPrivate { /** * Current horizontal scale. */ scaleX?: number; /** * Current vertical scale. */ scaleY?: number; } export interface ITreeEvents extends ILinkedHierarchyEvents { } /** * Displays a tree diagram. * * @see {@link https://www.amcharts.com/docs/v5/charts/hierarchy/tree/} for more info * @important */ export declare class Tree extends LinkedHierarchy { _settings: ITreeSettings; _privateSettings: ITreePrivate; _dataItemSettings: ITreeDataItem; protected _tag: string; static className: string; static classNames: Array; _hierarchyLayout: d3hierarchy.TreeLayout; _rootNode: d3hierarchy.HierarchyCircularNode | undefined; _packData: ITreeDataObject | undefined; _prepareChildren(): void; protected _updateVisuals(): void; protected _getPoint(hierarchyNode: this["_dataItemSettings"]["d3HierarchyNode"]): IPoint; } //# sourceMappingURL=Tree.d.ts.map