import { VegaChart } from "./chart_base"; import { type VegaLiteSpec } from "./specs"; import type { ChartTheme } from "./theme"; import type { AxisConfig, ThemeMode } from "./types"; export interface GanttTask { /** Stable identifier — surfaced in click events. */ id: string; /** Y-axis label; tasks with the same label collapse onto one row. */ label: string; start: Date | string | number; end: Date | string | number; /** Bucket key into {@link GanttChartConfig.statusColors}. */ statusGroup: string; /** Optional inline hover text; falls back to a default if omitted. */ hover?: string; /** Free-form payload echoed back in click events. */ customdata?: unknown; } export interface GanttChartConfig { tasks: GanttTask[]; /** Map ``statusGroup`` → CSS colour. Missing keys fall back to ``#a3a3a3``. */ statusColors: Record; /** Optional friendly label per status group used in the legend. */ statusLabels?: Record; /** Optional per-status opacity (0–1) to fade pending/queued bars. */ statusOpacity?: Record; /** Order in which legend groups appear. Unknown keys are appended. */ statusOrder?: string[]; /** Bar thickness in pixels. Default 18. */ barWidth?: number; /** Per-row spacing in pixels — drives total height. Default 28. */ rowHeight?: number; /** Show the legend strip. Default true. */ showLegend?: boolean; xAxis?: AxisConfig; modebar?: boolean; theme?: ThemeMode; /** Named preset from presets/*.json. Default "molplot". */ preset?: string; } export interface GanttClickEvent { taskId: string; label: string; customdata?: unknown; } type ClickListener = (e: GanttClickEvent) => void; /** * Gantt chart drawn as one time-spanning bar per task (Vega-Lite bar with * `x`/`x2`), coloured by status group. Cleaner than the former plotly * line-segment recipe while keeping the same config surface and the * `onTaskClick` contract. */ export declare class GanttChart extends VegaChart { private config; private readonly clickListeners; constructor(container: HTMLElement, config: GanttChartConfig); update(partial: Partial): Promise; onTaskClick(cb: ClickListener): () => void; private rows; protected datasets(): Record; protected buildSpec(theme: ChartTheme, sizeHint: { width: number; height: number; }): VegaLiteSpec; protected onDatum(datum: Record): void; } export {};