# @birchui/gantt API reference

> Birch UI Gantt: project scheduling with dependencies, critical path and baselines

```bash
npm install @birchui/gantt
```

## @birchui/gantt

### createGantt

Kind: function. Import from `@birchui/gantt`.

```ts
function createGantt<TTask extends GanttTask = GanttTask>(container: HTMLElement, options: GanttOptions<TTask>): GanttApi<TTask>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `container` | `HTMLElement` |  |
| `options` | `GanttOptions<TTask>` |  |

### createGanttProject

Kind: function. Import from `@birchui/gantt`.

```ts
function createGanttProject<TTask extends GanttTask = GanttTask>(options: GanttProjectOptions<TTask> = {}): GanttProject<TTask>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `options?` | `GanttProjectOptions<TTask>` |  |

### formatPredecessor

Kind: function. Import from `@birchui/gantt`.

```ts
function formatPredecessor(ref: string, type: DependencyType, lag: number, lagUnit: LagUnit): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `ref` | `string` |  |
| `type` | `DependencyType` |  |
| `lag` | `number` |  |
| `lagUnit` | `LagUnit` |  |

### parsePredecessors

Kind: function. Import from `@birchui/gantt`.

```ts
function parsePredecessors(text: string, isKnownRef?: (ref: string) => boolean): PredecessorParseResult
```

| Parameter | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `isKnownRef?` | `(ref: string) => boolean` |  |

### readMSProjectXML

Kind: function. Import from `@birchui/gantt`.

```ts
function readMSProjectXML(xml: string, warn: (message: string) => void = () => undefined, options: MspReadOptions = {}): MspImportResult
```

| Parameter | Type | Description |
| --- | --- | --- |
| `xml` | `string` |  |
| `warn?` | `(message: string) => void` |  |
| `options?` | `MspReadOptions` |  |

### routeDependency

Kind: function. Import from `@birchui/gantt`.

```ts
function routeDependency(from: BarBox, to: BarBox, type: DependencyType, gap = 10): Route
```

| Parameter | Type | Description |
| --- | --- | --- |
| `from` | `BarBox` |  |
| `to` | `BarBox` |  |
| `type` | `DependencyType` |  |
| `gap?` | `unknown` |  |

### InputLimitError

Kind: class. Import from `@birchui/gantt`.

```ts
class InputLimitError extends Error
new InputLimitError(readonly code: InputLimitCode, readonly limit: number, readonly actual: number, message: string)
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly name` | `"InputLimitError"` |  |
| `readonly code` | `InputLimitCode` |  |
| `readonly limit` | `number` |  |
| `readonly actual` | `number` |  |

### DEFAULT_CALENDAR

Kind: const. Import from `@birchui/gantt`.

```ts
const DEFAULT_CALENDAR: GanttCalendar
```

### DEFAULT_MSP_LIMITS

Kind: const. Import from `@birchui/gantt`.

```ts
const DEFAULT_MSP_LIMITS: Readonly<MspLimits>
```

### GANTT_EVENT_NAMES

Kind: const. Import from `@birchui/gantt`.

```ts
const GANTT_EVENT_NAMES: readonly (keyof GanttEvents)[]
```

### GANTT_VIEW_PRESETS

Kind: const. Import from `@birchui/gantt`.

```ts
const GANTT_VIEW_PRESETS: Readonly<Record<GanttViewPresetName, ViewPreset>>
```

### GANTT_ZOOM_LEVELS

Kind: const. Import from `@birchui/gantt`.

```ts
const GANTT_ZOOM_LEVELS: readonly GanttViewPresetName[]
```

### ganttDefinition

Kind: const. Import from `@birchui/gantt`.

```ts
const ganttDefinition: WidgetDefinition<GanttOptions<GanttTask>, GanttEvents<GanttTask>, GanttApi<GanttTask>>
```

### ganttStyles

Kind: const. Import from `@birchui/gantt`.

```ts
const ganttStyles: "\n.lq-gantt,\n.lq-gantt.lq-theme-light {\n --lq-gantt-bar-color: #3366cc;\n --lq-gantt-summary: #3d4450;\n --lq-gantt-milestone: #8250df;\n --lq-gantt-critical: #cf222e;\n --lq-gantt-baseline: #8c959f;\n --lq-gantt-link: #6e7781;\n --lq-gantt-today: #bc4c00;\n --lq-gantt-nonworking-bg: rgba(15, 23, 42, 0.05);\n --lq-gantt-row-line: var(--lq-border-subtle, #e6eaef);\n}\n\n.lq-gantt.lq-theme-dark {\n --lq-gantt-bar-color: #5b8def;\n --lq-gantt-summary: #c9d1d9;\n --lq-gantt-milestone: #a371f7;\n --lq-gantt-critical: #ff7b72;\n --lq-gantt-baseline: #6e7681;\n --lq-gantt-link: #8b949e;\n --lq-gantt-today: #f0883e;\n --lq-gantt-nonworking-bg: rgba(255, 255, 255, 0.045);\n}\n\n@media (prefers-color-scheme: dark) {\n .lq-gantt.lq-theme-auto {\n --lq-gantt-bar-color: #5b8def;\n --lq-gantt-summary: #c9d1d9;\n --lq-gantt-milestone: #a371f7;\n --lq-gantt-critical: #ff7b72;\n --lq-gantt-baseline: #6e7681;\n --lq-gantt-link: #8b949e;\n --lq-gantt-today: #f0883e;\n --lq-gantt-nonworking-bg: rgba(255, 255, 255, 0.045);\n }\n}\n\n.lq-gantt {\n position: relative;\n display: flex;\n box-sizing: border-box;\n width: 100%;\n height: var(--lq-gantt-height, 100%);\n min-height: 200px;\n overflow: hidden;\n font-family: var(--lq-font-family, system-ui, sans-serif);\n font-size: var(--lq-font-size, 13px);\n line-height: 1.4;\n color: var(--lq-fg, #1f2328);\n background: var(--lq-bg, #ffffff);\n border: 1px solid var(--lq-border, #d1d9e0);\n border-radius: var(--lq-radius, 6px);\n font-variant-numeric: tabular-nums;\n}\n.lq-gantt *, .lq-gantt *::before, .lq-gantt *::after { box-sizing: border-box; }\n\n.lq-gantt-grid {\n flex: none;\n width: var(--lq-gantt-grid-width, 480px);\n min-width: 0;\n height: 100%;\n}\n.lq-gantt-grid > .lq-grid { border: 0; border-radius: 0; min-height: 0; }\n.lq-gantt-grid .lq-viewport { overflow-x: scroll; }\n.lq-gantt-grid .lq-row { border-bottom-color: var(--lq-gantt-row-line); }\n\n.lq-gantt-name { display: flex; align-items: center; gap: 4px; min-width: 0; }\n.lq-gantt-name-text { overflow: hidden; text-overflow: ellipsis; min-width: 0; }\n.lq-gantt-name-text--summary { font-weight: 600; }\n.lq-gantt-toggle,\n.lq-gantt-toggle-spacer {\n flex: none;\n width: 18px;\n height: 18px;\n}\n.lq-gantt-toggle {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: 0;\n border-radius: 4px;\n background: transparent;\n color: var(--lq-muted-fg, #59636e);\n cursor: pointer;\n}\n.lq-gantt-toggle::before {\n content: \"\";\n width: 6px;\n height: 6px;\n border-inline-end: 2px solid currentColor;\n border-bottom: 2px solid currentColor;\n transform: rotate(-45deg);\n}\n.lq-gantt-toggle[aria-expanded=\"true\"]::before { transform: translateY(-2px) rotate(45deg); }\n.lq-gantt[dir=\"rtl\"] .lq-gantt-toggle::before { scale: -1 1; }\n.lq-gantt-toggle:hover { background: var(--lq-row-hover, #eef3f9); color: var(--lq-fg, #1f2328); }\n.lq-gantt-date-editor { font-variant-numeric: tabular-nums; }\n\n.lq-gantt-splitter {\n flex: none;\n width: 6px;\n height: 100%;\n cursor: col-resize;\n touch-action: none;\n background: var(--lq-header-bg, #f6f8fa);\n border-inline-start: 1px solid var(--lq-border, #d1d9e0);\n border-inline-end: 1px solid var(--lq-border, #d1d9e0);\n outline: none;\n}\n.lq-gantt-splitter:hover, .lq-gantt--resizing-grid .lq-gantt-splitter { background: var(--lq-accent, #1f6feb); }\n.lq-gantt-splitter:focus-visible { box-shadow: inset 0 0 0 2px var(--lq-focus-ring, #1f6feb); }\n.lq-gantt--resizing-grid, .lq-gantt--resizing-grid * { cursor: col-resize !important; user-select: none !important; }\n\n.lq-gantt-timeline { position: relative; flex: 1 1 auto; min-width: 0; height: 100%; }\n.lq-gantt-scroller {\n position: absolute;\n inset: 0;\n overflow: scroll;\n outline: none;\n overscroll-behavior: contain;\n}\n.lq-gantt-scroller:focus-visible { box-shadow: inset 0 0 0 2px var(--lq-focus-ring, #1f6feb); }\n\n.lq-gantt-head {\n position: sticky;\n top: 0;\n z-index: 5;\n width: var(--lq-gantt-timeline-width);\n min-width: 100%;\n height: calc(var(--lq-gantt-header-height, 56px) + 1px);\n background: var(--lq-header-bg, #f6f8fa);\n border-bottom: 1px solid var(--lq-border, #d1d9e0);\n color: var(--lq-header-fg, #1f2328);\n}\n.lq-gantt-hrow { position: absolute; inset-inline: 0; height: var(--lq-gantt-header-row-height, 28px); }\n.lq-gantt-hrow + .lq-gantt-hrow { border-top: 1px solid var(--lq-border-subtle, #e6eaef); }\n.lq-gantt-hcell {\n position: absolute;\n top: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n padding: 0 6px;\n overflow: hidden;\n white-space: nowrap;\n font-size: 12px;\n font-weight: 600;\n border-inline-end: 1px solid var(--lq-border-subtle, #e6eaef);\n}\n.lq-gantt-hlabel { position: sticky; inset-inline-start: 4px; overflow: hidden; text-overflow: ellipsis; }\n.lq-gantt-hrow--ticks .lq-gantt-hcell { justify-content: center; padding: 0 1px; font-weight: 500; }\n.lq-gantt-hrow--ticks .lq-gantt-hlabel { position: static; text-overflow: clip; }\n\n.lq-gantt-body {\n position: relative;\n width: var(--lq-gantt-timeline-width);\n min-width: 100%;\n height: var(--lq-gantt-body-height, 0px);\n min-height: 1px;\n}\n.lq-gantt-bg, .lq-gantt-rows { position: absolute; inset: 0; pointer-events: none; }\n.lq-gantt-shade { position: absolute; top: 0; bottom: 0; background: var(--lq-gantt-nonworking-bg); }\n.lq-gantt-major { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--lq-border-subtle, #e6eaef); }\n.lq-gantt-row-selected,\n.lq-gantt-row-target {\n position: absolute;\n inset-inline-start: 0;\n inset-inline-end: 0;\n height: var(--lq-gantt-row-height, 36px);\n}\n.lq-gantt-row-selected { background: var(--lq-selection-bg, rgba(31, 111, 235, 0.12)); }\n.lq-gantt-row-target { box-shadow: inset 0 0 0 1px var(--lq-accent, #1f6feb); }\n\n.lq-gantt-links { position: absolute; z-index: 1; overflow: visible; pointer-events: none; }\n.lq-gantt[dir=\"rtl\"] .lq-gantt-links { transform: scaleX(-1); }\n.lq-gantt-link-line { fill: none; stroke: var(--lq-gantt-link); stroke-width: 1.5; }\n.lq-gantt-link-arrow { fill: var(--lq-gantt-link); }\n.lq-gantt-link-hit { fill: none; stroke: transparent; stroke-width: 10; pointer-events: stroke; cursor: pointer; }\n.lq-gantt--readonly .lq-gantt-link-hit { cursor: default; }\n.lq-gantt-link--critical .lq-gantt[dir=\"rtl\"] .lq-gantt-links { transform: scaleX(-1); }\n.lq-gantt-link-line { stroke: var(--lq-gantt-critical); }\n.lq-gantt-link--critical .lq-gantt-link-arrow { fill: var(--lq-gantt-critical); }\n.lq-gantt-link--selected .lq-gantt[dir=\"rtl\"] .lq-gantt-links { transform: scaleX(-1); }\n.lq-gantt-link-line { stroke: var(--lq-accent, #1f6feb); stroke-width: 2.5; }\n.lq-gantt-link--selected .lq-gantt-link-arrow { fill: var(--lq-accent, #1f6feb); }\n.lq-gantt-link-draft { fill: none; stroke: var(--lq-accent, #1f6feb); stroke-width: 1.5; stroke-dasharray: 4 3; }\n\n.lq-gantt-bars { position: absolute; inset: 0; z-index: 2; pointer-events: none; }\n.lq-gantt-bar {\n position: absolute;\n pointer-events: auto;\n border: 1px solid var(--lq-gantt-bar-color);\n border-radius: 4px;\n background: color-mix(in srgb, var(--lq-gantt-bar-color) 28%, var(--lq-bg, #ffffff));\n cursor: grab;\n outline: none;\n touch-action: none;\n}\n.lq-gantt--readonly .lq-gantt-bar { cursor: default; }\n.lq-gantt-bar:focus-visible { box-shadow: 0 0 0 2px var(--lq-bg, #ffffff), 0 0 0 4px var(--lq-focus-ring, #1f6feb); }\n.lq-gantt-bar--selected { box-shadow: 0 0 0 2px var(--lq-accent, #1f6feb); }\n.lq-gantt--critical .lq-gantt-bar--critical { --lq-gantt-bar-color: var(--lq-gantt-critical); }\n.lq-gantt-bar-progress {\n position: absolute;\n top: 0;\n bottom: 0;\n inset-inline-start: 0;\n border-start-start-radius: 3px;\n border-end-start-radius: 3px;\n background: var(--lq-gantt-bar-color);\n pointer-events: none;\n}\n.lq-gantt-bar-label {\n position: absolute;\n top: 50%;\n inset-inline-start: calc(100% + 8px);\n transform: translateY(-50%);\n font-size: 12px;\n white-space: nowrap;\n color: var(--lq-fg, #1f2328);\n pointer-events: none;\n}\n.lq-gantt-bar--summary {\n border: 0;\n border-radius: 0;\n background: color-mix(in srgb, var(--lq-gantt-summary) 35%, var(--lq-bg, #ffffff));\n}\n.lq-gantt-bar--summary .lq-gantt-bar-progress { border-radius: 0; background: var(--lq-gantt-summary); }\n.lq-gantt-bar--summary::before,\n.lq-gantt-bar--summary::after {\n content: \"\";\n position: absolute;\n top: 100%;\n width: 0;\n height: 0;\n border-top: 6px solid var(--lq-gantt-summary);\n}\n.lq-gantt-bar--summary::before { inset-inline-start: 0; border-inline-end: 6px solid transparent; }\n.lq-gantt-bar--summary::after { inset-inline-end: 0; border-inline-start: 6px solid transparent; }\n.lq-gantt--critical .lq-gantt-bar--summary.lq-gantt-bar--critical { --lq-gantt-summary: var(--lq-gantt-critical); }\n.lq-gantt-bar--milestone { border: 0; background: transparent; }\n.lq-gantt-bar--milestone::before {\n content: \"\";\n position: absolute;\n inset: 15%;\n border-radius: 2px;\n background: var(--lq-gantt-milestone);\n transform: rotate(45deg);\n}\n.lq-gantt--critical .lq-gantt-bar--milestone.lq-gantt-bar--critical::before { background: var(--lq-gantt-critical); }\n.lq-gantt-bar--manual { border-style: dashed; }\n.lq-gantt-bar--conflict { outline: 2px dotted var(--lq-gantt-critical); outline-offset: 2px; }\n.lq-gantt-bar--dragging { z-index: 3; opacity: 0.85; cursor: grabbing; }\n.lq-gantt-bar--link-target { box-shadow: 0 0 0 2px var(--lq-accent, #1f6feb); }\n.lq-gantt-bar--link-invalid { box-shadow: 0 0 0 2px var(--lq-gantt-critical); }\n.lq-gantt-bar--link-source { box-shadow: 0 0 0 2px var(--lq-gantt-milestone); }\n\n.lq-gantt-resize { position: absolute; top: 0; inset-inline-end: -4px; bottom: 0; width: 9px; cursor: ew-resize; }\n.lq-gantt-progress-handle {\n position: absolute;\n bottom: -7px;\n width: 10px;\n height: 7px;\n margin-inline-start: -5px;\n background: var(--lq-fg, #1f2328);\n clip-path: polygon(50% 0, 100% 100%, 0 100%);\n cursor: ew-resize;\n opacity: 0;\n}\n.lq-gantt-connector {\n position: absolute;\n top: 50%;\n width: 10px;\n height: 10px;\n margin-top: -5px;\n border: 2px solid var(--lq-accent, #1f6feb);\n border-radius: 50%;\n background: var(--lq-bg, #ffffff);\n cursor: crosshair;\n opacity: 0;\n}\n.lq-gantt-connector--start { inset-inline-start: -15px; }\n.lq-gantt-connector--end { inset-inline-end: -15px; }\n.lq-gantt-bar:hover .lq-gantt-connector,\n.lq-gantt-bar:hover .lq-gantt-progress-handle,\n.lq-gantt--linking .lq-gantt-connector { opacity: 1; }\n.lq-gantt--dragging, .lq-gantt--dragging * { cursor: grabbing !important; user-select: none !important; }\n.lq-gantt--linking, .lq-gantt--linking * { cursor: crosshair !important; user-select: none !important; }\n\n.lq-gantt-baseline {\n position: absolute;\n height: 4px;\n border-radius: 2px;\n background: var(--lq-gantt-baseline);\n pointer-events: none;\n}\n.lq-gantt-baseline--milestone { height: 8px; width: 8px; border-radius: 1px; transform: rotate(45deg); }\n\n.lq-gantt-today {\n position: absolute;\n top: 0;\n bottom: 0;\n z-index: 3;\n width: 2px;\n margin-inline-start: -1px;\n background: var(--lq-gantt-today);\n pointer-events: none;\n}\n.lq-gantt-today-head {\n position: absolute;\n bottom: 0;\n width: 10px;\n height: 6px;\n margin-inline-start: -5px;\n background: var(--lq-gantt-today);\n clip-path: polygon(0 0, 100% 0, 50% 100%);\n}\n.lq-gantt-today[hidden], .lq-gantt-today-head[hidden] { display: none; }\n\n.lq-gantt-live,\n.lq-gantt-help {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0 0 0 0);\n white-space: nowrap;\n border: 0;\n}\n\n@media (forced-colors: active) {\n .lq-gantt-bar { border-color: CanvasText; }\n .lq-gantt-bar-progress, .lq-gantt-bar--milestone::before { background: Highlight; }\n .lq-gantt[dir=\"rtl\"] .lq-gantt-links { transform: scaleX(-1); }\n.lq-gantt-link-line { stroke: CanvasText; }\n .lq-gantt-link-arrow { fill: CanvasText; }\n .lq-gantt-splitter:focus-visible,\n .lq-gantt-scroller:focus-visible,\n .lq-gantt-bar:focus-visible,\n .lq-gantt :focus-visible {\n outline: 2px solid Highlight;\n outline-offset: -2px;\n }\n .lq-gantt-row-target { outline: 1px solid Highlight; outline-offset: -1px; }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .lq-gantt *, .lq-gantt *::before, .lq-gantt *::after { transition: none !important; animation: none !important; }\n}\n" = ` .lq-gantt, .lq-gantt.lq-theme-light { --lq-gantt-bar-color: #3366cc; --lq-gantt-summary: #3d4450; --lq-gantt-milestone: #8250df; --lq-gantt-critical: #cf222e; --lq-gantt-baseline: #8c959f; --lq-gantt-link: #6e7781; --lq-gantt-today: #bc4c00; --lq-gantt-nonworking-bg: rgba(15, 23, 42, 0.05); --lq-gantt-row-line: var(--lq-border-subtle, #e6eaef); } .lq-gantt.lq-theme-dark { --lq-gantt-bar-color: #5b8def; --lq-gantt-summary: #c9d1d9; --lq-gantt-milestone: #a371f7; --lq-gantt-critical: #ff7b72; --lq-gantt-baseline: #6e7681; --lq-gantt-link: #8b949e; --lq-gantt-today: #f0883e; --lq-gantt-nonworking-bg: rgba(255, 255, 255, 0.045); } @media (prefers-color-scheme: dark) { .lq-gantt.lq-theme-auto { --lq-gantt-bar-color: #5b8def; --lq-gantt-summary: #c9d1d9; --lq-gantt-milestone: #a371f7; --lq-gantt-critical: #ff7b72; --lq-gantt-baseline: #6e7681; --lq-gantt-link: #8b949e; --lq-gantt-today: #f0883e; --lq-gantt-nonworking-bg: rgba(255, 255, 255, 0.045); } } .lq-gantt { position: relative; display: flex; box-sizing: border-box; width: 100%; height: var(--lq-gantt-height, 100%); min-height: 200px; overflow: hidden; font-family: var(--lq-font-family, system-ui, sans-serif); font-size: var(--lq-font-size, 13px); line-height: 1.4; color: var(--lq-fg, #1f2328); background: var(--lq-bg, #ffffff); border: 1px solid var(--lq-border, #d1d9e0); border-radius: var(--lq-radius, 6px); font-variant-numeric: tabular-nums; } .lq-gantt *, .lq-gantt *::before, .lq-gantt *::after { box-sizing: border-box; } .lq-gantt-grid { flex: none; width: var(--lq-gantt-grid-width, 480px); min-width: 0; height: 100%; } .lq-gantt-grid > .lq-grid { border: 0; border-radius: 0; min-height: 0; } .lq-gantt-grid .lq-viewport { overflow-x: scroll; } .lq-gantt-grid .lq-row { border-bottom-color: var(--lq-gantt-row-line); } .lq-gantt-name { display: flex; align-items: center; gap: 4px; min-width: 0; } .lq-gantt-name-text { overflow: hidden; text-overflow: ellipsis; min-width: 0; } .lq-gantt-name-text--summary { font-weight: 600; } .lq-gantt-toggle, .lq-gantt-toggle-spacer { flex: none; width: 18px; height: 18px; } .lq-gantt-toggle { display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--lq-muted-fg, #59636e); cursor: pointer; } .lq-gantt-toggle::before { content: ""; width: 6px; height: 6px; border-inline-end: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); } .lq-gantt-toggle[aria-expanded="true"]::before { transform: translateY(-2px) rotate(45deg); } .lq-gantt[dir="rtl"] .lq-gantt-toggle::before { scale: -1 1; } .lq-gantt-toggle:hover { background: var(--lq-row-hover, #eef3f9); color: var(--lq-fg, #1f2328); } .lq-gantt-date-editor { font-variant-numeric: tabular-nums; } .lq-gantt-splitter { flex: none; width: 6px; height: 100%; cursor: col-resize; touch-action: none; background: var(--lq-header-bg, #f6f8fa); border-inline-start: 1px solid var(--lq-border, #d1d9e0); border-inline-end: 1px solid var(--lq-border, #d1d9e0); outline: none; } .lq-gantt-splitter:hover, .lq-gantt--resizing-grid .lq-gantt-splitter { background: var(--lq-accent, #1f6feb); } .lq-gantt-splitter:focus-visible { box-shadow: inset 0 0 0 2px var(--lq-focus-ring, #1f6feb); } .lq-gantt--resizing-grid, .lq-gantt--resizing-grid * { cursor: col-resize !important; user-select: none !important; } .lq-gantt-timeline { position: relative; flex: 1 1 auto; min-width: 0; height: 100%; } .lq-gantt-scroller { position: absolute; inset: 0; overflow: scroll; outline: none; overscroll-behavior: contain; } .lq-gantt-scroller:focus-visible { box-shadow: inset 0 0 0 2px var(--lq-focus-ring, #1f6feb); } .lq-gantt-head { position: sticky; top: 0; z-index: 5; width: var(--lq-gantt-timeline-width); min-width: 100%; height: calc(var(--lq-gantt-header-height, 56px) + 1px); background: var(--lq-header-bg, #f6f8fa); border-bottom: 1px solid var(--lq-border, #d1d9e0); color: var(--lq-header-fg, #1f2328); } .lq-gantt-hrow { position: absolute; inset-inline: 0; height: var(--lq-gantt-header-row-height, 28px); } .lq-gantt-hrow + .lq-gantt-hrow { border-top: 1px solid var(--lq-border-subtle, #e6eaef); } .lq-gantt-hcell { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; padding: 0 6px; overflow: hidden; white-space: nowrap; font-size: 12px; font-weight: 600; border-inline-end: 1px solid var(--lq-border-subtle, #e6eaef); } .lq-gantt-hlabel { position: sticky; inset-inline-start: 4px; overflow: hidden; text-overflow: ellipsis; } .lq-gantt-hrow--ticks .lq-gantt-hcell { justify-content: center; padding: 0 1px; font-weight: 500; } .lq-gantt-hrow--ticks .lq-gantt-hlabel { position: static; text-overflow: clip; } .lq-gantt-body { position: relative; width: var(--lq-gantt-timeline-width); min-width: 100%; height: var(--lq-gantt-body-height, 0px); min-height: 1px; } .lq-gantt-bg, .lq-gantt-rows { position: absolute; inset: 0; pointer-events: none; } .lq-gantt-shade { position: absolute; top: 0; bottom: 0; background: var(--lq-gantt-nonworking-bg); } .lq-gantt-major { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--lq-border-subtle, #e6eaef); } .lq-gantt-row-selected, .lq-gantt-row-target { position: absolute; inset-inline-start: 0; inset-inline-end: 0; height: var(--lq-gantt-row-height, 36px); } .lq-gantt-row-selected { background: var(--lq-selection-bg, rgba(31, 111, 235, 0.12)); } .lq-gantt-row-target { box-shadow: inset 0 0 0 1px var(--lq-accent, #1f6feb); } .lq-gantt-links { position: absolute; z-index: 1; overflow: visible; pointer-events: none; } .lq-gantt[dir="rtl"] .lq-gantt-links { transform: scaleX(-1); } .lq-gantt-link-line { fill: none; stroke: var(--lq-gantt-link); stroke-width: 1.5; } .lq-gantt-link-arrow { fill: var(--lq-gantt-link); } .lq-gantt-link-hit { fill: none; stroke: transparent; stroke-width: 10; pointer-events: stroke; cursor: pointer; } .lq-gantt--readonly .lq-gantt-link-hit { cursor: default; } .lq-gantt-link--critical .lq-gantt[dir="rtl"] .lq-gantt-links { transform: scaleX(-1); } .lq-gantt-link-line { stroke: var(--lq-gantt-critical); } .lq-gantt-link--critical .lq-gantt-link-arrow { fill: var(--lq-gantt-critical); } .lq-gantt-link--selected .lq-gantt[dir="rtl"] .lq-gantt-links { transform: scaleX(-1); } .lq-gantt-link-line { stroke: var(--lq-accent, #1f6feb); stroke-width: 2.5; } .lq-gantt-link--selected .lq-gantt-link-arrow { fill: var(--lq-accent, #1f6feb); } .lq-gantt-link-draft { fill: none; stroke: var(--lq-accent, #1f6feb); stroke-width: 1.5; stroke-dasharray: 4 3; } .lq-gantt-bars { position: absolute; inset: 0; z-index: 2; pointer-events: none; } .lq-gantt-bar { position: absolute; pointer-events: auto; border: 1px solid var(--lq-gantt-bar-color); border-radius: 4px; background: color-mix(in srgb, var(--lq-gantt-bar-color) 28%, var(--lq-bg, #ffffff)); cursor: grab; outline: none; touch-action: none; } .lq-gantt--readonly .lq-gantt-bar { cursor: default; } .lq-gantt-bar:focus-visible { box-shadow: 0 0 0 2px var(--lq-bg, #ffffff), 0 0 0 4px var(--lq-focus-ring, #1f6feb); } .lq-gantt-bar--selected { box-shadow: 0 0 0 2px var(--lq-accent, #1f6feb); } .lq-gantt--critical .lq-gantt-bar--critical { --lq-gantt-bar-color: var(--lq-gantt-critical); } .lq-gantt-bar-progress { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; border-start-start-radius: 3px; border-end-start-radius: 3px; background: var(--lq-gantt-bar-color); pointer-events: none; } .lq-gantt-bar-label { position: absolute; top: 50%; inset-inline-start: calc(100% + 8px); transform: translateY(-50%); font-size: 12px; white-space: nowrap; color: var(--lq-fg, #1f2328); pointer-events: none; } .lq-gantt-bar--summary { border: 0; border-radius: 0; background: color-mix(in srgb, var(--lq-gantt-summary) 35%, var(--lq-bg, #ffffff)); } .lq-gantt-bar--summary .lq-gantt-bar-progress { border-radius: 0; background: var(--lq-gantt-summary); } .lq-gantt-bar--summary::before, .lq-gantt-bar--summary::after { content: ""; position: absolute; top: 100%; width: 0; height: 0; border-top: 6px solid var(--lq-gantt-summary); } .lq-gantt-bar--summary::before { inset-inline-start: 0; border-inline-end: 6px solid transparent; } .lq-gantt-bar--summary::after { inset-inline-end: 0; border-inline-start: 6px solid transparent; } .lq-gantt--critical .lq-gantt-bar--summary.lq-gantt-bar--critical { --lq-gantt-summary: var(--lq-gantt-critical); } .lq-gantt-bar--milestone { border: 0; background: transparent; } .lq-gantt-bar--milestone::before { content: ""; position: absolute; inset: 15%; border-radius: 2px; background: var(--lq-gantt-milestone); transform: rotate(45deg); } .lq-gantt--critical .lq-gantt-bar--milestone.lq-gantt-bar--critical::before { background: var(--lq-gantt-critical); } .lq-gantt-bar--manual { border-style: dashed; } .lq-gantt-bar--conflict { outline: 2px dotted var(--lq-gantt-critical); outline-offset: 2px; } .lq-gantt-bar--dragging { z-index: 3; opacity: 0.85; cursor: grabbing; } .lq-gantt-bar--link-target { box-shadow: 0 0 0 2px var(--lq-accent, #1f6feb); } .lq-gantt-bar--link-invalid { box-shadow: 0 0 0 2px var(--lq-gantt-critical); } .lq-gantt-bar--link-source { box-shadow: 0 0 0 2px var(--lq-gantt-milestone); } .lq-gantt-resize { position: absolute; top: 0; inset-inline-end: -4px; bottom: 0; width: 9px; cursor: ew-resize; } .lq-gantt-progress-handle { position: absolute; bottom: -7px; width: 10px; height: 7px; margin-inline-start: -5px; background: var(--lq-fg, #1f2328); clip-path: polygon(50% 0, 100% 100%, 0 100%); cursor: ew-resize; opacity: 0; } .lq-gantt-connector { position: absolute; top: 50%; width: 10px; height: 10px; margin-top: -5px; border: 2px solid var(--lq-accent, #1f6feb); border-radius: 50%; background: var(--lq-bg, #ffffff); cursor: crosshair; opacity: 0; } .lq-gantt-connector--start { inset-inline-start: -15px; } .lq-gantt-connector--end { inset-inline-end: -15px; } .lq-gantt-bar:hover .lq-gantt-connector, .lq-gantt-bar:hover .lq-gantt-progress-handle, .lq-gantt--linking .lq-gantt-connector { opacity: 1; } .lq-gantt--dragging, .lq-gantt--dragging * { cursor: grabbing !important; user-select: none !important; } .lq-gantt--linking, .lq-gantt--linking * { cursor: crosshair !important; user-select: none !important; } .lq-gantt-baseline { position: absolute; height: 4px; border-radius: 2px; background: var(--lq-gantt-baseline); pointer-events: none; } .lq-gantt-baseline--milestone { height: 8px; width: 8px; border-radius: 1px; transform: rotate(45deg); } .lq-gantt-today { position: absolute; top: 0; bottom: 0; z-index: 3; width: 2px; margin-inline-start: -1px; background: var(--lq-gantt-today); pointer-events: none; } .lq-gantt-today-head { position: absolute; bottom: 0; width: 10px; height: 6px; margin-inline-start: -5px; background: var(--lq-gantt-today); clip-path: polygon(0 0, 100% 0, 50% 100%); } .lq-gantt-today[hidden], .lq-gantt-today-head[hidden] { display: none; } .lq-gantt-live, .lq-gantt-help { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; } @media (forced-colors: active) { .lq-gantt-bar { border-color: CanvasText; } .lq-gantt-bar-progress, .lq-gantt-bar--milestone::before { background: Highlight; } .lq-gantt[dir="rtl"] .lq-gantt-links { transform: scaleX(-1); } .lq-gantt-link-line { stroke: CanvasText; } .lq-gantt-link-arrow { fill: CanvasText; } .lq-gantt-splitter:focus-visible, .lq-gantt-scroller:focus-visible, .lq-gantt-bar:focus-visible, .lq-gantt :focus-visible { outline: 2px solid Highlight; outline-offset: -2px; } .lq-gantt-row-target { outline: 1px solid Highlight; outline-offset: -1px; } } @media (prefers-reduced-motion: reduce) { .lq-gantt *, .lq-gantt *::before, .lq-gantt *::after { transition: none !important; animation: none !important; } } `
```

### AddTaskPosition

Kind: interface. Import from `@birchui/gantt`.

```ts
interface AddTaskPosition
```

| Property | Type | Description |
| --- | --- | --- |
| `parentId?` | `string \| null` |  |
| `index?` | `number` |  |
| `above?` | `string` |  |
| `below?` | `string` |  |

### BarBox

Kind: interface. Import from `@birchui/gantt`.

```ts
interface BarBox
```

| Property | Type | Description |
| --- | --- | --- |
| `left` | `number` |  |
| `right` | `number` |  |
| `mid` | `number` |  |
| `rowTop` | `number` |  |
| `rowBottom` | `number` |  |

### Baseline

Kind: interface. Import from `@birchui/gantt`.

```ts
interface Baseline
```

| Property | Type | Description |
| --- | --- | --- |
| `start` | `DateInput` |  |
| `end` | `DateInput` |  |

### CalendarException

Kind: interface. Import from `@birchui/gantt`.

```ts
interface CalendarException
```

| Property | Type | Description |
| --- | --- | --- |
| `start` | `DateInput` |  |
| `end?` | `DateInput` |  |
| `name?` | `string` |  |
| `isWorking?` | `boolean` |  |
| `hours?` | `WorkingInterval[]` |  |

### CriticalPath

Kind: interface. Import from `@birchui/gantt`.

```ts
interface CriticalPath
```

| Property | Type | Description |
| --- | --- | --- |
| `taskIds` | `string[]` |  |
| `dependencyIds` | `string[]` |  |

### DependencyContext

Kind: interface. Import from `@birchui/gantt`.

```ts
interface DependencyContext<TTask extends GanttTask = GanttTask>
```

| Property | Type | Description |
| --- | --- | --- |
| `from` | `ScheduledTask<TTask>` |  |
| `to` | `ScheduledTask<TTask>` |  |
| `type` | `DependencyType` |  |
| `lag` | `number` |  |
| `lagUnit` | `LagUnit` |  |
| `source` | `ChangeSource` |  |

### DependencyCycle

Kind: interface. Import from `@birchui/gantt`.

```ts
interface DependencyCycle
```

| Property | Type | Description |
| --- | --- | --- |
| `taskIds` | `string[]` |  |
| `dependencyIds` | `string[]` |  |

### DependencyInput

Kind: interface. Import from `@birchui/gantt`.

```ts
interface DependencyInput
[key: string]: unknown
```

| Property | Type | Description |
| --- | --- | --- |
| `id?` | `string` |  |
| `from` | `string` |  |
| `to` | `string` |  |
| `type?` | `DependencyType` |  |
| `lag?` | `number` |  |
| `lagUnit?` | `LagUnit` |  |

### EditResult

Kind: interface. Import from `@birchui/gantt`.

```ts
interface EditResult
```

| Property | Type | Description |
| --- | --- | --- |
| `isApplied` | `boolean` |  |
| `errors` | `string[]` |  |

### GanttApi

Kind: interface. Import from `@birchui/gantt`.

```ts
interface GanttApi<TTask extends GanttTask = GanttTask> extends Widget<GanttOptions<TTask>, GanttEvents<TTask>>
```

| Property | Type | Description |
| --- | --- | --- |
| `setTasks` | `(tasks: TTask[]) => void` |  |
| `setDependencies` | `(dependencies: GanttDependency[]) => void` |  |
| `addTask` | `(task: Partial<TTask> & { name: string }, position?: AddTaskPosition) => ScheduledTask<TTask> \| undefined` |  |
| `updateTask` | `(id: string, patch: Partial<TTask>) => ScheduledTask<TTask> \| undefined` |  |
| `removeTask` | `(id: string) => boolean` |  |
| `indent` | `(id: string) => boolean` |  |
| `outdent` | `(id: string) => boolean` |  |
| `addDependency` | `(dependency: DependencyInput) => GanttDependency \| undefined` |  |
| `removeDependency` | `(id: string) => boolean` |  |
| `getTask` | `(id: string) => ScheduledTask<TTask> \| undefined` |  |
| `getTasks` | `() => ScheduledTask<TTask>[]` |  |
| `getDependencies` | `() => GanttDependency[]` |  |
| `schedule` | `() => ScheduleResult` |  |
| `getCriticalPath` | `() => CriticalPath` |  |
| `getSlack` | `(taskId: string) => TaskSlack \| undefined` |  |
| `getProjectRange` | `() => { start: Date; end: Date }` |  |
| `undo` | `() => boolean` |  |
| `redo` | `() => boolean` |  |
| `canUndo` | `() => boolean` |  |
| `canRedo` | `() => boolean` |  |
| `setViewPreset` | `(preset: GanttViewPresetName \| ViewPreset) => void` |  |
| `getViewPreset` | `() => ViewPreset` |  |
| `zoomIn` | `() => boolean` |  |
| `zoomOut` | `() => boolean` |  |
| `scrollToTask` | `(id: string) => void` |  |
| `scrollToDate` | `(date: DateInput, align?: ScrollAlign) => void` |  |
| `selectTask` | `(id: string \| null) => void` |  |
| `getSelectedTask` | `() => ScheduledTask<TTask> \| null` |  |
| `selectDependency` | `(id: string \| null) => void` |  |
| `expandTask` | `(id: string) => void` |  |
| `collapseTask` | `(id: string) => void` |  |
| `expandAll` | `() => void` |  |
| `collapseAll` | `() => void` |  |
| `xFromDate` | `(date: DateInput) => number` |  |
| `dateFromX` | `(x: number) => Date` |  |
| `getTaskBounds` | `(id: string) => TaskBounds \| undefined` |  |
| `toJSON` | `() => ProjectData<TTask>` |  |
| `fromJSON` | `(data: ProjectData<TTask> \| string) => void` |  |
| `toMSProjectXML` | `() => string` |  |
| `fromMSProjectXML` | `(xml: string, options?: MspReadOptions) => void` |  |
| `refresh` | `() => void` |  |
| `readonly element` | `HTMLElement` | Inherited from Widget. |
| `update` | `(options: Partial<GanttOptions<TTask>>) => void` | Inherited from Widget. |
| `on` | `<K extends keyof TEvents & string>(event: K, listener: Listener<TEvents[K]>) => () => void` | Inherited from Widget. |
| `destroy` | `() => void` | Inherited from Widget. |

### GanttCalendar

Kind: interface. Import from `@birchui/gantt`.

```ts
interface GanttCalendar
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `name?` | `string` |  |
| `workingDays?` | `number[]` |  |
| `workingHours?` | `WorkingInterval[]` |  |
| `weekHours?` | `Partial<Record<number, WorkingInterval[]>>` |  |
| `exceptions?` | `CalendarException[]` |  |

### GanttColumn

Kind: interface. Import from `@birchui/gantt`.

```ts
interface GanttColumn<TTask extends GanttTask = GanttTask>
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `GanttColumnId \| (string & {})` |  |
| `header?` | `string` |  |
| `width?` | `number` |  |
| `field?` | `string` |  |
| `editable?` | `boolean` |  |
| `align?` | `'left' \| 'center' \| 'right'` |  |
| `renderer?` | `(task: ScheduledTask<TTask>) => string` |  |

### GanttDependency

Kind: interface. Import from `@birchui/gantt`.

```ts
interface GanttDependency
[key: string]: unknown
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `from` | `string` |  |
| `to` | `string` |  |
| `type?` | `DependencyType` |  |
| `lag?` | `number` |  |
| `lagUnit?` | `LagUnit` |  |

### GanttEvents

Kind: interface. Import from `@birchui/gantt`.

```ts
interface GanttEvents<TTask extends GanttTask = GanttTask>
```

| Property | Type | Description |
| --- | --- | --- |
| `ready` | `{ api: GanttApi<TTask> }` |  |
| `taskClick` | `TaskInteraction<TTask>` |  |
| `taskDoubleClick` | `TaskInteraction<TTask>` |  |
| `taskChange` | `{ task: ScheduledTask<TTask>; previous: ScheduledTask<TTask>; source: ChangeSource }` |  |
| `taskAdd` | `{ task: ScheduledTask<TTask>; source: ChangeSource }` |  |
| `taskRemove` | `{ task: ScheduledTask<TTask>; source: ChangeSource }` |  |
| `tasksScheduled` | `{ changed: string[]; ms: number; conflicts: string[] }` |  |
| `dependencyCreate` | `{ dependency: GanttDependency; source: ChangeSource }` |  |
| `dependencyRemove` | `{ dependency: GanttDependency; source: ChangeSource }` |  |
| `selectionChange` | `{ task: ScheduledTask<TTask> \| null; dependency: GanttDependency \| null; previousTask: ScheduledTask<TTask> \| null; previousDependency: GanttDependency \| null; }` |  |
| `viewportScroll` | `{ left: number; top: number; visibleStart: Date; visibleEnd: Date }` |  |
| `cycleDetected` | `{ cycles: DependencyCycle[] }` |  |
| `viewPresetChanged` | `{ preset: ViewPreset; previous: ViewPreset }` |  |

### GanttOptions

Kind: interface. Import from `@birchui/gantt`.

```ts
interface GanttOptions<TTask extends GanttTask = GanttTask>
```

| Property | Type | Description |
| --- | --- | --- |
| `tasks` | `TTask[]` |  |
| `dependencies?` | `GanttDependency[]` |  |
| `calendars?` | `GanttCalendar[]` |  |
| `calendarId?` | `string` |  |
| `projectStart?` | `DateInput` |  |
| `hoursPerDay?` | `number` |  |
| `daysPerWeek?` | `number` |  |
| `unlinkedTaskStart?` | `UnlinkedTaskStart` |  |
| `autoSchedule?` | `boolean` |  |
| `timeZone?` | `string` |  |
| `locale?` | `string` |  |
| `weekStartsOn?` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6` |  |
| `viewPreset?` | `GanttViewPresetName \| ViewPreset` |  |
| `zoomLevels?` | `(GanttViewPresetName \| ViewPreset)[]` |  |
| `columns?` | `(GanttColumnId \| GanttColumn<TTask>)[]` |  |
| `gridWidth?` | `number` |  |
| `rowHeight?` | `number` |  |
| `barHeight?` | `number` |  |
| `headerRowHeight?` | `number` |  |
| `showCriticalPath?` | `boolean` |  |
| `showBaselines?` | `boolean` |  |
| `baselineIndex?` | `number` |  |
| `showDependencies?` | `boolean` |  |
| `showTodayLine?` | `boolean` |  |
| `today?` | `DateInput` |  |
| `tabToIndent?` | `boolean` |  |
| `readOnly?` | `boolean` |  |
| `validateTaskChange?` | `(context: TaskChangeContext<TTask>) => boolean` |  |
| `validateDependency?` | `(context: DependencyContext<TTask>) => boolean` |  |
| `taskTooltip?` | `boolean \| ((task: ScheduledTask<TTask>) => string)` |  |
| `theme?` | `GanttTheme` |  |
| `height?` | `number \| string` |  |
| `overscanRows?` | `number` |  |
| `overscanPx?` | `number` |  |
| `historyLimit?` | `number` |  |
| `ariaLabel?` | `string` |  |
| `licenseKey?` | `string` |  |
| `injectStyles?` | `boolean` |  |
| `localeText?` | `LocaleTextInput` |  |
| `rtl?` | `boolean` |  |

### GanttProject

Kind: interface. Import from `@birchui/gantt`.

```ts
interface GanttProject<TTask extends GanttTask = GanttTask>
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly zone` | `TimeZone` |  |
| `readonly units` | `WorkUnits` |  |
| `readonly projectCalendar` | `WorkCalendar` |  |
| `readonly lastResult` | `ScheduleResult \| null` |  |
| `on` | `<K extends keyof ProjectEvents>(event: K, listener: Listener<ProjectEvents[K]>) => () => void` |  |
| `configure` | `(options: Partial<GanttProjectOptions<TTask>>) => void` |  |
| `load` | `(tasks: TTask[], dependencies?: GanttDependency[]) => ScheduleResult` |  |
| `setDependencies` | `(dependencies: GanttDependency[]) => ScheduleResult` |  |
| `schedule` | `() => ScheduleResult` |  |
| `getTask` | `(id: string) => ScheduledTask<TTask> \| undefined` |  |
| `getTaskData` | `(id: string) => Readonly<TTask> \| undefined` |  |
| `getTaskName` | `(id: string) => string` |  |
| `getTasks` | `() => ScheduledTask<TTask>[]` |  |
| `getDependencies` | `() => GanttDependency[]` |  |
| `getDependency` | `(id: string) => GanttDependency \| undefined` |  |
| `hasTask` | `(id: string) => boolean` |  |
| `order` | `() => readonly string[]` |  |
| `parentOf` | `(id: string) => string \| null` |  |
| `childrenOf` | `(id: string \| null) => readonly string[]` |  |
| `hasChildren` | `(id: string) => boolean` |  |
| `depthOf` | `(id: string) => number` |  |
| `wbsOf` | `(id: string) => string` |  |
| `scheduleOf` | `(id: string) => TaskSchedule \| undefined` |  |
| `calendarOf` | `(id: string) => WorkCalendar` |  |
| `toWall` | `(input: DateInput \| null \| undefined) => number` |  |
| `toInstant` | `(wall: number) => number` |  |
| `addTask` | `(task: Partial<TTask> & { name: string }, position?: AddTaskPosition) => ScheduledTask<TTask> \| undefined` |  |
| `updateTask` | `(id: string, patch: Partial<TTask>) => ScheduledTask<TTask> \| undefined` |  |
| `removeTask` | `(id: string) => boolean` |  |
| `indent` | `(id: string) => boolean` |  |
| `outdent` | `(id: string) => boolean` |  |
| `moveTask` | `(id: string, start: DateInput) => boolean` |  |
| `resizeTask` | `(id: string, end: DateInput) => boolean` |  |
| `setPercentDone` | `(id: string, percent: number) => boolean` |  |
| `editField` | `(id: string, field: EditableField, text: string) => EditResult` |  |
| `predecessorText` | `(id: string) => string` |  |
| `resolveTaskRef` | `(ref: string) => string \| undefined` |  |
| `addDependency` | `(dependency: DependencyInput) => GanttDependency \| undefined` |  |
| `updateDependency` | `(id: string, patch: Partial<Pick<GanttDependency, 'type' \| 'lag' \| 'lagUnit'>>) => boolean` |  |
| `removeDependency` | `(id: string) => boolean` |  |
| `checkDependency` | `(from: string, to: string, type: DependencyType) => string \| null` |  |
| `transaction` | `<T>(label: string, fn: () => T) => T` |  |
| `undo` | `() => boolean` |  |
| `redo` | `() => boolean` |  |
| `canUndo` | `() => boolean` |  |
| `canRedo` | `() => boolean` |  |
| `clearHistory` | `() => void` |  |
| `getCriticalPath` | `() => CriticalPath` |  |
| `getSlack` | `(id: string) => TaskSlack \| undefined` |  |
| `getProjectRange` | `() => { start: Date; end: Date }` |  |
| `toJSON` | `() => ProjectData<TTask>` |  |
| `fromJSON` | `(data: ProjectData<TTask> \| string) => ScheduleResult` |  |
| `toMSProjectXML` | `() => string` |  |
| `fromMSProjectXML` | `(xml: string, options?: MspReadOptions) => ScheduleResult` |  |

### GanttProjectOptions

Kind: interface. Import from `@birchui/gantt`.

```ts
interface GanttProjectOptions<TTask extends GanttTask = GanttTask>
```

| Property | Type | Description |
| --- | --- | --- |
| `name?` | `string` |  |
| `tasks?` | `TTask[]` |  |
| `dependencies?` | `GanttDependency[]` |  |
| `calendars?` | `GanttCalendar[]` |  |
| `calendarId?` | `string` |  |
| `projectStart?` | `DateInput` |  |
| `timeZone?` | `string` |  |
| `hoursPerDay?` | `number` |  |
| `daysPerWeek?` | `number` |  |
| `unlinkedTaskStart?` | `UnlinkedTaskStart` |  |
| `autoSchedule?` | `boolean` |  |
| `historyLimit?` | `number` |  |
| `today?` | `DateInput` |  |
| `warn?` | `(message: string) => void` |  |

### GanttTask

Kind: interface. Import from `@birchui/gantt`.

```ts
interface GanttTask
[key: string]: unknown
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `parentId?` | `string \| null` |  |
| `name` | `string` |  |
| `start?` | `DateInput` |  |
| `end?` | `DateInput` |  |
| `duration?` | `number` |  |
| `durationUnit?` | `DurationUnit` |  |
| `percentDone?` | `number` |  |
| `type?` | `TaskType` |  |
| `constraint?` | `TaskConstraint \| null` |  |
| `baselines?` | `Baseline[]` |  |
| `resourceIds?` | `string[]` |  |
| `color?` | `string` |  |
| `manuallyScheduled?` | `boolean` |  |
| `calendarId?` | `string \| null` |  |
| `expanded?` | `boolean` |  |

### HeaderRowConfig

Kind: interface. Import from `@birchui/gantt`.

```ts
interface HeaderRowConfig
```

| Property | Type | Description |
| --- | --- | --- |
| `unit` | `TimeUnit` |  |
| `increment?` | `number` |  |
| `format?` | `HeaderFormat` |  |

### MspImportResult

Kind: interface. Import from `@birchui/gantt`.

```ts
interface MspImportResult extends ProjectData
```

| Property | Type | Description |
| --- | --- | --- |
| `calendarId?` | `string` |  |
| `name?` | `string \| undefined` | Inherited from ProjectData. |
| `projectStart?` | `DateInput \| undefined` | Inherited from ProjectData. |
| `hoursPerDay?` | `number \| undefined` | Inherited from ProjectData. |
| `daysPerWeek?` | `number \| undefined` | Inherited from ProjectData. |
| `calendars?` | `GanttCalendar[] \| undefined` | Inherited from ProjectData. |
| `tasks` | `GanttTask[]` | Inherited from ProjectData. |
| `dependencies?` | `GanttDependency[] \| undefined` | Inherited from ProjectData. |

### MspLimits

Kind: interface. Import from `@birchui/gantt`.

```ts
interface MspLimits
```

| Property | Type | Description |
| --- | --- | --- |
| `maxLength` | `number` |  |
| `maxTasks` | `number` |  |
| `maxLinks` | `number` |  |

### MspReadOptions

Kind: interface. Import from `@birchui/gantt`.

```ts
interface MspReadOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `limits?` | `Partial<MspLimits>` |  |

### PredecessorToken

Kind: interface. Import from `@birchui/gantt`.

```ts
interface PredecessorToken
```

| Property | Type | Description |
| --- | --- | --- |
| `ref` | `string` |  |
| `type` | `DependencyType` |  |
| `lag` | `number` |  |
| `lagUnit` | `LagUnit` |  |

### ProjectData

Kind: interface. Import from `@birchui/gantt`.

```ts
interface ProjectData<TTask extends GanttTask = GanttTask>
```

| Property | Type | Description |
| --- | --- | --- |
| `name?` | `string` |  |
| `projectStart?` | `DateInput` |  |
| `calendarId?` | `string` |  |
| `hoursPerDay?` | `number` |  |
| `daysPerWeek?` | `number` |  |
| `calendars?` | `GanttCalendar[]` |  |
| `tasks` | `TTask[]` |  |
| `dependencies?` | `GanttDependency[]` |  |

### ProjectEvents

Kind: interface. Import from `@birchui/gantt`.

```ts
interface ProjectEvents
```

| Property | Type | Description |
| --- | --- | --- |
| `scheduled` | `ScheduleResult` |  |
| `cycleDetected` | `{ cycles: DependencyCycle[] }` |  |

### Route

Kind: interface. Import from `@birchui/gantt`.

```ts
interface Route
```

| Property | Type | Description |
| --- | --- | --- |
| `points` | `Point[]` |  |
| `arrow` | `'left' \| 'right'` |  |

### ScheduledFields

Kind: interface. Import from `@birchui/gantt`.

```ts
interface ScheduledFields
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `parentId` | `string \| null` |  |
| `name` | `string` |  |
| `start` | `Date` |  |
| `end` | `Date` |  |
| `duration` | `number` |  |
| `durationUnit` | `DurationUnit` |  |
| `percentDone` | `number` |  |
| `type` | `TaskType` |  |
| `wbs` | `string` |  |
| `outlineLevel` | `number` |  |
| `earlyStart` | `Date` |  |
| `earlyEnd` | `Date` |  |
| `lateStart` | `Date` |  |
| `lateEnd` | `Date` |  |
| `totalSlack` | `number` |  |
| `freeSlack` | `number` |  |
| `isCritical` | `boolean` |  |
| `hasConflict` | `boolean` |  |

### ScheduleResult

Kind: interface. Import from `@birchui/gantt`.

```ts
interface ScheduleResult
```

| Property | Type | Description |
| --- | --- | --- |
| `changed` | `string[]` |  |
| `ms` | `number` |  |
| `cycles` | `DependencyCycle[]` |  |
| `conflicts` | `string[]` |  |
| `projectStart` | `Date` |  |
| `projectEnd` | `Date` |  |

### TaskBounds

Kind: interface. Import from `@birchui/gantt`.

```ts
interface TaskBounds
```

| Property | Type | Description |
| --- | --- | --- |
| `left` | `number` |  |
| `top` | `number` |  |
| `width` | `number` |  |
| `height` | `number` |  |

### TaskChangeContext

Kind: interface. Import from `@birchui/gantt`.

```ts
interface TaskChangeContext<TTask extends GanttTask = GanttTask>
```

| Property | Type | Description |
| --- | --- | --- |
| `task` | `ScheduledTask<TTask>` |  |
| `changes` | `Partial<GanttTask>` |  |
| `start` | `Date` |  |
| `end` | `Date` |  |
| `source` | `ChangeSource` |  |

### TaskConstraint

Kind: interface. Import from `@birchui/gantt`.

```ts
interface TaskConstraint
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `ConstraintType` |  |
| `date?` | `DateInput` |  |

### TaskInteraction

Kind: interface. Import from `@birchui/gantt`.

```ts
interface TaskInteraction<TTask extends GanttTask = GanttTask>
```

| Property | Type | Description |
| --- | --- | --- |
| `task` | `ScheduledTask<TTask>` |  |
| `domEvent` | `MouseEvent \| KeyboardEvent` |  |

### TaskSchedule

Kind: interface. Import from `@birchui/gantt`.

```ts
interface TaskSchedule
```

| Property | Type | Description |
| --- | --- | --- |
| `start` | `number` |  |
| `end` | `number` |  |
| `earlyStart` | `number` |  |
| `earlyEnd` | `number` |  |
| `lateStart` | `number` |  |
| `lateEnd` | `number` |  |
| `durationMs` | `number` |  |
| `totalSlack` | `number` |  |
| `freeSlack` | `number` |  |
| `isCritical` | `boolean` |  |
| `hasConflict` | `boolean` |  |
| `percentDone` | `number` |  |
| `isSummary` | `boolean` |  |
| `isMilestone` | `boolean` |  |
| `isManual` | `boolean` |  |
| `calendar` | `WorkCalendar` |  |

### TaskSlack

Kind: interface. Import from `@birchui/gantt`.

```ts
interface TaskSlack
```

| Property | Type | Description |
| --- | --- | --- |
| `total` | `number` |  |
| `free` | `number` |  |
| `totalMs` | `number` |  |
| `freeMs` | `number` |  |
| `isCritical` | `boolean` |  |

### ViewPreset

Kind: interface. Import from `@birchui/gantt`.

```ts
interface ViewPreset
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `tickUnit` | `TimeUnit` |  |
| `tickIncrement?` | `number` |  |
| `tickWidth` | `number` |  |
| `headers` | `HeaderRowConfig[]` |  |
| `compactHeaders?` | `HeaderRowConfig[]` |  |
| `snap?` | `number \| 'tick'` |  |

### WorkCalendar

Kind: interface. Import from `@birchui/gantt`.

```ts
interface WorkCalendar
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly id` | `string` |  |
| `readonly name` | `string` |  |
| `readonly definition` | `GanttCalendar` |  |
| `intervals` | `(day: number) => readonly Interval[]` |  |
| `dayWork` | `(day: number) => number` |  |
| `isWorkingDay` | `(day: number) => boolean` |  |
| `addWorking` | `(time: number, work: number) => number` |  |
| `subtractWorking` | `(time: number, work: number) => number` |  |
| `workingBetween` | `(from: number, to: number) => number` |  |
| `snapStart` | `(time: number) => number` |  |
| `snapMilestone` | `(time: number) => number` |  |
| `snapFinish` | `(time: number) => number` |  |
| `nonWorkingSpans` | `(from: number, to: number, includeHours: boolean) => TimeSpan[]` |  |

### WorkingInterval

Kind: interface. Import from `@birchui/gantt`.

```ts
interface WorkingInterval
```

| Property | Type | Description |
| --- | --- | --- |
| `from` | `string` |  |
| `to` | `string` |  |

### ChangeSource

Kind: type. Import from `@birchui/gantt`.

```ts
type ChangeSource = 'drag' | 'resize' | 'progress' | 'edit' | 'keyboard' | 'api' | 'undo' | 'redo';
```

### ConstraintType

Kind: type. Import from `@birchui/gantt`.

```ts
type ConstraintType = 'asap' | 'alap' | 'snet' | 'snlt' | 'fnet' | 'fnlt' | 'mso' | 'mfo';
```

### DateInput

Kind: type. Import from `@birchui/gantt`.

```ts
type DateInput = Date | string | number;
```

### DependencyType

Kind: type. Import from `@birchui/gantt`.

```ts
type DependencyType = 'FS' | 'SS' | 'FF' | 'SF';
```

### DurationUnit

Kind: type. Import from `@birchui/gantt`.

```ts
type DurationUnit = 'day' | 'hour';
```

### EditableField

Kind: type. Import from `@birchui/gantt`.

```ts
type EditableField = 'name' | 'start' | 'end' | 'duration' | 'percentDone' | 'predecessors';
```

### GanttColumnId

Kind: type. Import from `@birchui/gantt`.

```ts
type GanttColumnId = 'wbs' | 'name' | 'start' | 'end' | 'duration' | 'percentDone' | 'predecessors';
```

### GanttTheme

Kind: type. Import from `@birchui/gantt`.

```ts
type GanttTheme = 'light' | 'dark' | 'auto';
```

### GanttViewPresetName

Kind: type. Import from `@birchui/gantt`.

```ts
type GanttViewPresetName = ViewPresetName | 'weekAndDay' | 'monthAndQuarter';
```

### InputLimitCode

Kind: type. Import from `@birchui/gantt`.

```ts
type InputLimitCode =
  'input-too-long' | 'too-many-rows' | 'too-many-columns' | 'too-many-events' | 'too-many-tasks' | 'too-many-links';
```

### LagUnit

Kind: type. Import from `@birchui/gantt`.

```ts
type LagUnit = 'minute' | 'hour' | 'day' | 'week' | 'elapsedHour' | 'elapsedDay';
```

### ScheduledTask

Kind: type. Import from `@birchui/gantt`.

```ts
type ScheduledTask<TTask extends GanttTask = GanttTask> = TTask & ScheduledFields;
```

### ScrollAlign

Kind: type. Import from `@birchui/gantt`.

```ts
type ScrollAlign = 'start' | 'center' | 'end';
```

### TaskType

Kind: type. Import from `@birchui/gantt`.

```ts
type TaskType = 'task' | 'milestone' | 'summary';
```

### TimeUnit

Kind: type. Import from `@birchui/gantt`.

```ts
type TimeUnit = 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
```

### UnlinkedTaskStart

Kind: type. Import from `@birchui/gantt`.

```ts
type UnlinkedTaskStart = 'keep' | 'projectStart';
```

### ViewPresetName

Kind: type. Import from `@birchui/gantt`.

```ts
type ViewPresetName = 'minuteAndHour' | 'hourAndDay' | 'dayAndWeek' | 'dayAndMonth' | 'weekAndMonth' | 'monthAndYear';
```
