import type { PolarLength, PolarMark } from './polar.js'; import type { TransformValue } from './transform.js'; import type { Channel, ChartKey, ChartMarkMotionOptions, VisualChannel } from './types.js'; export interface SunburstNode { readonly id: string; readonly parentId: string | null; readonly ancestorIds: readonly string[]; readonly branchId: string | null; readonly name: string; readonly data: TDatum | null; readonly depth: number; readonly height: number; readonly internal: boolean; readonly external: boolean; readonly value: number; readonly source: readonly TDatum[]; readonly sourceIndexes: readonly number[]; } export type SunburstNodeComparator = (left: SunburstNode, right: SunburstNode) => number; interface SunburstSharedOptions extends ChartMarkMotionOptions> { readonly id?: string; readonly className?: string; readonly value: TransformValue; readonly sort?: SunburstNodeComparator; /** Hierarchy node whose children form the first rendered ring. */ readonly rootId?: string; /** Maximum descendant rings rendered below the active root. */ readonly visibleDepth?: number; readonly innerRadius?: PolarLength; readonly outerRadius?: PolarLength; /** Fixed pixel gap between adjacent hierarchy rings. Defaults to zero. */ readonly ringPadding?: number; readonly z?: Channel, ChartKey | null | undefined>; readonly color?: Channel, ChartKey | null | undefined>; readonly fill?: VisualChannel, string>; readonly fillOpacity?: number; readonly stroke?: VisualChannel, string>; readonly strokeOpacity?: number; readonly strokeWidth?: number; readonly strokeDasharray?: string; readonly opacity?: number; } export type SunburstPathOptions = SunburstSharedOptions & { readonly path: TransformValue; readonly delimiter?: string; readonly nodeId?: never; readonly parentId?: never; }; export type SunburstParentOptions = SunburstSharedOptions & { readonly nodeId: TransformValue; readonly parentId: TransformValue; readonly path?: never; readonly delimiter?: never; }; export type SunburstOptions = SunburstPathOptions | SunburstParentOptions; /** Lays out and renders a flat hierarchy as responsive polar sectors. */ export declare function sunburst>(source: Iterable, options: SunburstSharedOptions & { readonly path: TPath; readonly delimiter?: string; readonly nodeId?: never; readonly parentId?: never; }): PolarMark, number, number>; export declare function sunburst, const TParentId extends TransformValue>(source: Iterable, options: SunburstSharedOptions & { readonly nodeId: TNodeId; readonly parentId: TParentId; readonly path?: never; readonly delimiter?: never; }): PolarMark, number, number>; export {};