import { BaseLayoutOptions } from '../types.js'; /** * 环形 Circular 布局配置 * * Circular layout configuration */ interface CircularLayoutOptions extends BaseLayoutOptions { /** * 圆的半径 * * Circle radius * @remarks * 若设置了 radius,则 startRadius 与 endRadius 不生效 * * If radius is set, startRadius and endRadius will not take effect * @defaultValue null */ radius?: number | null; /** * 螺旋状布局的起始半径 * * Spiral layout start radius * @defaultValue null */ startRadius?: number | null; /** * 螺旋状布局的结束半径 * * Spiral layout end radius * @defaultValue null */ endRadius?: number | null; /** * 是否顺时针排列 * * Whether to arrange clockwise * @defaultValue true */ clockwise?: boolean; /** * 节点在环上的分段数(几个段将均匀分布) * * Number of segments (how many segments will be evenly distributed) * @remarks * 在 endRadius - startRadius != 0 时生效 * * It takes effect when endRadius - startRadius != 0 * @defaultValue 1 */ divisions?: number; /** * 节点在环上排序的依据 * - null: 直接使用数据中的顺序 * - 'topology': 按照拓扑排序 * - 'topology-directed': 按照拓扑排序(有向图) * - 'degree': 按度数降序排序 * Sorting basis of nodes on the ring * - null: Use the order in the data directly * - 'topology': Sort according to topological order * - 'topology-directed': Sort according to topological order (directed graph) * - 'degree': Sort descending by degree * @defaultValue null */ ordering?: 'topology' | 'topology-directed' | 'degree' | null; /** * 从第一个节点到最后节点之间相隔多少个 2*PI * * The distance between the first node and the last node is separated by how many 2*PI * @defaultValue 1 */ angleRatio?: number; /** * 起始角度 * * Start angle * @defaultValue 0 */ startAngle?: number; /** * 结束角度 * * End angle * @defaultValue 2 * Math.PI */ endAngle?: number; } export type { CircularLayoutOptions };