@birchui/gantt
Gantt: createGantt, tasks, dependencies, calendars, scheduling, MS Project XML and the headless project engine.
Key exports: createGantt, GanttOptions, GanttApi, GanttEvents, GanttTask, GanttDependency, createGanttProject
Guides: Keyboard and accessibility, Gantt API and events, Baselines, Working calendars, Dependencies, Headless engine
Functions#
createGanttfunction#
function createGantt<TTask extends GanttTask = GanttTask>(container: HTMLElement, options: GanttOptions<TTask>): GanttApi<TTask>| Parameter | Type | Description |
|---|---|---|
container | HTMLElement | — |
options | GanttOptions<TTask> | — |
Defined in packages/gantt/src/gantt.ts:21
createGanttProjectfunction#
function createGanttProject<TTask extends GanttTask = GanttTask>(options: GanttProjectOptions<TTask> = {}): GanttProject<TTask>| Parameter | Type | Description |
|---|---|---|
optionsoptional | GanttProjectOptions<TTask> | — |
Defined in packages/gantt/src/engine/project.ts:889
formatPredecessorfunction#
function formatPredecessor(ref: string, type: DependencyType, lag: number, lagUnit: LagUnit): string| Parameter | Type | Description |
|---|---|---|
ref | string | — |
type | DependencyType | — |
lag | number | — |
lagUnit | LagUnit | — |
Defined in packages/gantt/src/engine/predecessors.ts:57
parsePredecessorsfunction#
function parsePredecessors(text: string, isKnownRef?: (ref: string) => boolean): PredecessorParseResult| Parameter | Type | Description |
|---|---|---|
text | string | — |
isKnownRefoptional | (ref: string) => boolean | — |
Defined in packages/gantt/src/engine/predecessors.ts:44
readMSProjectXMLfunction#
function readMSProjectXML(xml: string, warn: (message: string) => void = () => undefined, options: MspReadOptions = {}): MspImportResult| Parameter | Type | Description |
|---|---|---|
xml | string | — |
warnoptional | (message: string) => void | — |
optionsoptional | MspReadOptions | — |
Defined in packages/gantt/src/engine/msproject.ts:548
routeDependencyfunction#
function routeDependency(from: BarBox, to: BarBox, type: DependencyType, gap = 10): Route| Parameter | Type | Description |
|---|---|---|
from | BarBox | — |
to | BarBox | — |
type | DependencyType | — |
gapoptional | unknown | — |
Defined in packages/gantt/src/engine/routing.ts:37
Classes#
InputLimitErrorclass#
class InputLimitError extends Error
new InputLimitError(readonly code: InputLimitCode, readonly limit: number, readonly actual: number, message: string)| Member | Type | Description |
|---|---|---|
namereadonly | "InputLimitError" | — |
codereadonly | InputLimitCode | — |
limitreadonly | number | — |
actualreadonly | number | — |
Defined in packages/core/src/input-limits.ts:4
Constants#
DEFAULT_CALENDARconst#
const DEFAULT_CALENDAR: GanttCalendarDefined in packages/gantt/src/engine/calendar.ts:35
DEFAULT_MSP_LIMITSconst#
const DEFAULT_MSP_LIMITS: Readonly<MspLimits>Defined in packages/gantt/src/engine/msproject.ts:538
GANTT_EVENT_NAMESconst#
const GANTT_EVENT_NAMES: readonly (keyof GanttEvents)[]Defined in packages/gantt/src/gantt.ts:5
GANTT_VIEW_PRESETSconst#
const GANTT_VIEW_PRESETS: Readonly<Record<GanttViewPresetName, ViewPreset>>Defined in packages/gantt/src/presets.ts:14
GANTT_ZOOM_LEVELSconst#
const GANTT_ZOOM_LEVELS: readonly GanttViewPresetName[]Defined in packages/gantt/src/presets.ts:52
ganttDefinitionconst#
const ganttDefinition: WidgetDefinition<GanttOptions<GanttTask>, GanttEvents<GanttTask>, GanttApi<GanttTask>>Defined in packages/gantt/src/gantt.ts:133
ganttStylesconst#
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; } } `Defined in packages/gantt/src/styles.ts:1
Interfaces#
AddTaskPositioninterface#
interface AddTaskPosition| Property | Type | Description |
|---|---|---|
parentIdoptional | string | null | — |
indexoptional | number | — |
aboveoptional | string | — |
belowoptional | string | — |
Defined in packages/gantt/src/types.ts:144
BarBoxinterface#
interface BarBoxDefined in packages/gantt/src/engine/routing.ts:3
Baselineinterface#
interface BaselineDefined in packages/gantt/src/types.ts:26
CalendarExceptioninterface#
interface CalendarException| Property | Type | Description |
|---|---|---|
start | DateInput | — |
endoptional | DateInput | — |
nameoptional | string | — |
isWorkingoptional | boolean | — |
hoursoptional | WorkingInterval[] | — |
Defined in packages/gantt/src/types.ts:76
CriticalPathinterface#
interface CriticalPath| Property | Type | Description |
|---|---|---|
taskIds | string[] | — |
dependencyIds | string[] | — |
Defined in packages/gantt/src/types.ts:125
DependencyContextinterface#
interface DependencyContext<TTask extends GanttTask = GanttTask>| Property | Type | Description |
|---|---|---|
from | ScheduledTask<TTask> | — |
to | ScheduledTask<TTask> | — |
type | DependencyType | — |
lag | number | — |
lagUnit | LagUnit | — |
source | ChangeSource | — |
Defined in packages/gantt/src/types.ts:172
DependencyCycleinterface#
interface DependencyCycle| Property | Type | Description |
|---|---|---|
taskIds | string[] | — |
dependencyIds | string[] | — |
Defined in packages/gantt/src/types.ts:130
DependencyInputinterface#
interface DependencyInput
[key: string]: unknown| Property | Type | Description |
|---|---|---|
idoptional | string | — |
from | string | — |
to | string | — |
typeoptional | DependencyType | — |
lagoptional | number | — |
lagUnitoptional | LagUnit | — |
Defined in packages/gantt/src/types.ts:61
EditResultinterface#
interface EditResultDefined in packages/gantt/src/engine/project-api.ts:48
GanttApiinterface#
interface GanttApi<TTask extends GanttTask = GanttTask> extends Widget<GanttOptions<TTask>, GanttEvents<TTask>>| Member | 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 | — |
elementreadonly | 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. |
Defined in packages/gantt/src/types.ts:275
GanttCalendarinterface#
interface GanttCalendar| Property | Type | Description |
|---|---|---|
id | string | — |
nameoptional | string | — |
workingDaysoptional | number[] | — |
workingHoursoptional | WorkingInterval[] | — |
weekHoursoptional | Partial<Record<number, WorkingInterval[]>> | — |
exceptionsoptional | CalendarException[] | — |
Defined in packages/gantt/src/types.ts:84
GanttColumninterface#
interface GanttColumn<TTask extends GanttTask = GanttTask>| Property | Type | Description |
|---|---|---|
id | GanttColumnId | (string & {}) | — |
headeroptional | string | — |
widthoptional | number | — |
fieldoptional | string | — |
editableoptional | boolean | — |
alignoptional | 'left' | 'center' | 'right' | — |
rendereroptional | (task: ScheduledTask<TTask>) => string | — |
Defined in packages/gantt/src/types.ts:187
GanttDependencyinterface#
interface GanttDependency
[key: string]: unknown| Property | Type | Description |
|---|---|---|
id | string | — |
from | string | — |
to | string | — |
typeoptional | DependencyType | — |
lagoptional | number | — |
lagUnitoptional | LagUnit | — |
Defined in packages/gantt/src/types.ts:51
GanttEventsinterface#
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 } | — |
Defined in packages/gantt/src/types.ts:247
GanttOptionsinterface#
interface GanttOptions<TTask extends GanttTask = GanttTask>| Property | Type | Description |
|---|---|---|
tasks | TTask[] | — |
dependenciesoptional | GanttDependency[] | — |
calendarsoptional | GanttCalendar[] | — |
calendarIdoptional | string | — |
projectStartoptional | DateInput | — |
hoursPerDayoptional | number | — |
daysPerWeekoptional | number | — |
unlinkedTaskStartoptional | UnlinkedTaskStart | — |
autoScheduleoptional | boolean | — |
timeZoneoptional | string | — |
localeoptional | string | — |
weekStartsOnoptional | 0 | 1 | 2 | 3 | 4 | 5 | 6 | — |
viewPresetoptional | GanttViewPresetName | ViewPreset | — |
zoomLevelsoptional | (GanttViewPresetName | ViewPreset)[] | — |
columnsoptional | (GanttColumnId | GanttColumn<TTask>)[] | — |
gridWidthoptional | number | — |
rowHeightoptional | number | — |
barHeightoptional | number | — |
headerRowHeightoptional | number | — |
showCriticalPathoptional | boolean | — |
showBaselinesoptional | boolean | — |
baselineIndexoptional | number | — |
showDependenciesoptional | boolean | — |
showTodayLineoptional | boolean | — |
todayoptional | DateInput | — |
tabToIndentoptional | boolean | — |
readOnlyoptional | boolean | — |
validateTaskChangeoptional | (context: TaskChangeContext<TTask>) => boolean | — |
validateDependencyoptional | (context: DependencyContext<TTask>) => boolean | — |
taskTooltipoptional | boolean | ((task: ScheduledTask<TTask>) => string) | — |
themeoptional | GanttTheme | — |
heightoptional | number | string | — |
overscanRowsoptional | number | — |
overscanPxoptional | number | — |
historyLimitoptional | number | — |
ariaLabeloptional | string | — |
licenseKeyoptional | string | — |
injectStylesoptional | boolean | — |
localeTextoptional | LocaleTextInput | — |
rtloptional | boolean | — |
Defined in packages/gantt/src/types.ts:199
GanttProjectinterface#
interface GanttProject<TTask extends GanttTask = GanttTask>| Property | Type | Description |
|---|---|---|
zonereadonly | TimeZone | — |
unitsreadonly | WorkUnits | — |
projectCalendarreadonly | WorkCalendar | — |
lastResultreadonly | 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 | — |
Defined in packages/gantt/src/engine/project-api.ts:53
GanttProjectOptionsinterface#
interface GanttProjectOptions<TTask extends GanttTask = GanttTask>| Property | Type | Description |
|---|---|---|
nameoptional | string | — |
tasksoptional | TTask[] | — |
dependenciesoptional | GanttDependency[] | — |
calendarsoptional | GanttCalendar[] | — |
calendarIdoptional | string | — |
projectStartoptional | DateInput | — |
timeZoneoptional | string | — |
hoursPerDayoptional | number | — |
daysPerWeekoptional | number | — |
unlinkedTaskStartoptional | UnlinkedTaskStart | — |
autoScheduleoptional | boolean | — |
historyLimitoptional | number | — |
todayoptional | DateInput | — |
warnoptional | (message: string) => void | — |
Defined in packages/gantt/src/engine/project-api.ts:24
GanttTaskinterface#
interface GanttTask
[key: string]: unknown| Property | Type | Description |
|---|---|---|
id | string | — |
parentIdoptional | string | null | — |
name | string | — |
startoptional | DateInput | — |
endoptional | DateInput | — |
durationoptional | number | — |
durationUnitoptional | DurationUnit | — |
percentDoneoptional | number | — |
typeoptional | TaskType | — |
constraintoptional | TaskConstraint | null | — |
baselinesoptional | Baseline[] | — |
resourceIdsoptional | string[] | — |
coloroptional | string | — |
manuallyScheduledoptional | boolean | — |
calendarIdoptional | string | null | — |
expandedoptional | boolean | — |
Defined in packages/gantt/src/types.ts:31
HeaderRowConfiginterface#
interface HeaderRowConfig| Property | Type | Description |
|---|---|---|
unit | TimeUnit | — |
incrementoptional | number | — |
formatoptional | HeaderFormat | — |
Defined in packages/scheduler/dist/snap-D4wvso4X.d.ts:62
MspImportResultinterface#
interface MspImportResult extends ProjectData| Property | Type | Description |
|---|---|---|
calendarIdoptional | string | — |
nameoptional | string | undefined | Inherited from ProjectData. |
projectStartoptional | DateInput | undefined | Inherited from ProjectData. |
hoursPerDayoptional | number | undefined | Inherited from ProjectData. |
daysPerWeekoptional | number | undefined | Inherited from ProjectData. |
calendarsoptional | GanttCalendar[] | undefined | Inherited from ProjectData. |
tasks | GanttTask[] | Inherited from ProjectData. |
dependenciesoptional | GanttDependency[] | undefined | Inherited from ProjectData. |
Defined in packages/gantt/src/engine/msproject.ts:412
MspLimitsinterface#
interface MspLimitsDefined in packages/gantt/src/engine/msproject.ts:532
MspReadOptionsinterface#
interface MspReadOptionsDefined in packages/gantt/src/engine/msproject.ts:544
PredecessorTokeninterface#
interface PredecessorTokenDefined in packages/gantt/src/engine/predecessors.ts:4
ProjectDatainterface#
interface ProjectData<TTask extends GanttTask = GanttTask>| Property | Type | Description |
|---|---|---|
nameoptional | string | — |
projectStartoptional | DateInput | — |
calendarIdoptional | string | — |
hoursPerDayoptional | number | — |
daysPerWeekoptional | number | — |
calendarsoptional | GanttCalendar[] | — |
tasks | TTask[] | — |
dependenciesoptional | GanttDependency[] | — |
Defined in packages/gantt/src/types.ts:151
ProjectEventsinterface#
interface ProjectEvents| Property | Type | Description |
|---|---|---|
scheduled | ScheduleResult | — |
cycleDetected | { cycles: DependencyCycle[] } | — |
Defined in packages/gantt/src/engine/project-api.ts:41
Routeinterface#
interface RouteDefined in packages/gantt/src/engine/routing.ts:13
ScheduledFieldsinterface#
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 | — |
Defined in packages/gantt/src/types.ts:93
ScheduleResultinterface#
interface ScheduleResult| Property | Type | Description |
|---|---|---|
changed | string[] | — |
ms | number | — |
cycles | DependencyCycle[] | — |
conflicts | string[] | — |
projectStart | Date | — |
projectEnd | Date | — |
Defined in packages/gantt/src/types.ts:135
TaskBoundsinterface#
interface TaskBoundsDefined in packages/gantt/src/types.ts:268
TaskChangeContextinterface#
interface TaskChangeContext<TTask extends GanttTask = GanttTask>| Property | Type | Description |
|---|---|---|
task | ScheduledTask<TTask> | — |
changes | Partial<GanttTask> | — |
start | Date | — |
end | Date | — |
source | ChangeSource | — |
Defined in packages/gantt/src/types.ts:164
TaskConstraintinterface#
interface TaskConstraint| Property | Type | Description |
|---|---|---|
type | ConstraintType | — |
dateoptional | DateInput | — |
Defined in packages/gantt/src/types.ts:21
TaskInteractioninterface#
interface TaskInteraction<TTask extends GanttTask = GanttTask>| Property | Type | Description |
|---|---|---|
task | ScheduledTask<TTask> | — |
domEvent | MouseEvent | KeyboardEvent | — |
Defined in packages/gantt/src/types.ts:242
TaskScheduleinterface#
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 | — |
Defined in packages/gantt/src/engine/cpm.ts:19
TaskSlackinterface#
interface TaskSlack| Property | Type | Description |
|---|---|---|
total | number | — |
free | number | — |
totalMs | number | — |
freeMs | number | — |
isCritical | boolean | — |
Defined in packages/gantt/src/types.ts:117
ViewPresetinterface#
interface ViewPreset| Property | Type | Description |
|---|---|---|
id | string | — |
tickUnit | TimeUnit | — |
tickIncrementoptional | number | — |
tickWidth | number | — |
headers | HeaderRowConfig[] | — |
compactHeadersoptional | HeaderRowConfig[] | — |
snapoptional | number | 'tick' | — |
Defined in packages/scheduler/dist/snap-D4wvso4X.d.ts:67
WorkCalendarinterface#
interface WorkCalendar| Property | Type | Description |
|---|---|---|
idreadonly | string | — |
namereadonly | string | — |
definitionreadonly | 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[] | — |
Defined in packages/gantt/src/engine/calendar.ts:12
WorkingIntervalinterface#
interface WorkingIntervalDefined in packages/gantt/src/types.ts:71
Types#
ChangeSourcetype#
type ChangeSource = 'drag' | 'resize' | 'progress' | 'edit' | 'keyboard' | 'api' | 'undo' | 'redo';Defined in packages/gantt/src/types.ts:162
ConstraintTypetype#
type ConstraintType = 'asap' | 'alap' | 'snet' | 'snlt' | 'fnet' | 'fnlt' | 'mso' | 'mfo';Defined in packages/gantt/src/types.ts:17
DateInputtype#
type DateInput = Date | string | number;Defined in packages/gantt/src/types.ts:7
DependencyTypetype#
type DependencyType = 'FS' | 'SS' | 'FF' | 'SF';Defined in packages/gantt/src/types.ts:13
DurationUnittype#
type DurationUnit = 'day' | 'hour';Defined in packages/gantt/src/types.ts:11
EditableFieldtype#
type EditableField = 'name' | 'start' | 'end' | 'duration' | 'percentDone' | 'predecessors';Defined in packages/gantt/src/engine/project-api.ts:46
GanttColumnIdtype#
type GanttColumnId = 'wbs' | 'name' | 'start' | 'end' | 'duration' | 'percentDone' | 'predecessors';Defined in packages/gantt/src/types.ts:185
GanttThemetype#
type GanttTheme = 'light' | 'dark' | 'auto';Defined in packages/gantt/src/types.ts:181
GanttViewPresetNametype#
type GanttViewPresetName = ViewPresetName | 'weekAndDay' | 'monthAndQuarter';Defined in packages/gantt/src/types.ts:183
InputLimitCodetype#
type InputLimitCode =
'input-too-long' | 'too-many-rows' | 'too-many-columns' | 'too-many-events' | 'too-many-tasks' | 'too-many-links';Defined in packages/core/src/input-limits.ts:1
LagUnittype#
type LagUnit = 'minute' | 'hour' | 'day' | 'week' | 'elapsedHour' | 'elapsedDay';Defined in packages/gantt/src/types.ts:15
ScheduledTasktype#
type ScheduledTask<TTask extends GanttTask = GanttTask> = TTask & ScheduledFields;Defined in packages/gantt/src/types.ts:115
ScrollAligntype#
type ScrollAlign = 'start' | 'center' | 'end';Defined in packages/gantt/src/types.ts:197
TaskTypetype#
type TaskType = 'task' | 'milestone' | 'summary';Defined in packages/gantt/src/types.ts:9
TimeUnittype#
type TimeUnit = 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';Defined in packages/scheduler/dist/snap-D4wvso4X.d.ts:49
UnlinkedTaskStarttype#
type UnlinkedTaskStart = 'keep' | 'projectStart';Defined in packages/gantt/src/types.ts:19
ViewPresetNametype#
type ViewPresetName = 'minuteAndHour' | 'hourAndDay' | 'dayAndWeek' | 'dayAndMonth' | 'weekAndMonth' | 'monthAndYear';Defined in packages/scheduler/dist/snap-D4wvso4X.d.ts:76