Skip to main content

Type Alias: GanttScaleOptions

GanttScaleOptions = { fit?: never; preset?: never; range?: never; scale: TimeScaleModel; } | { fit?: TimeScaleFit; preset?: PresetRef; range?: "fitDataset" | { end: InstantInput; start: InstantInput; }; scale?: undefined; }

Defined in: api/gantt.ts:272

Two ways to set the time axis, made mutually exclusive at the type level (issue #84 — the prior shape accepted both and silently ignored preset/range/fit in favor of scale, with only a warning to say so). Sharing an axis and building a private one from preset/range/fit are not two knobs for the same job; a caller states one or the other.

Union Members​

Type Literal​

{ fit?: never; preset?: never; range?: never; scale: TimeScaleModel; }

fit?​

optional fit?: never

preset?​

optional preset?: never

range?​

optional range?: never

scale​

scale: TimeScaleModel

Bound viewport object (D9, plans/02 §5) — pass the same instance to two Gantt instances to x-sync them.


Type Literal​

{ fit?: TimeScaleFit; preset?: PresetRef; range?: "fitDataset" | { end: InstantInput; start: InstantInput; }; scale?: undefined; }

fit?​

optional fit?: TimeScaleFit

preset?​

optional preset?: PresetRef

Build a private default TimeScaleModel sized to the dataset's entries.

range?​

optional range?: "fitDataset" | { end: InstantInput; start: InstantInput; }

Loose input (S1.12), read through the dataset's zone at construction/assignment.

scale?​

optional scale?: undefined