Interface: ViewPreset
Defined in: time/scale.ts:48
Data, not a switch statement — shipped presets are config objects; custom ones are too (plans/01 §5.1).
Properties
headers
headers: readonly
ViewPresetHeader[]
Defined in: time/scale.ts:55
id
id:
string
Defined in: time/scale.ts:49
minTickWidthPx?
optionalminTickWidthPx?:number
Defined in: time/scale.ts:60
The density floor: below this, this preset's labels stop being legible. Defaults to
preferredTickWidthPx when omitted, which makes a custom preset never compress.
preferredTickWidthPx
preferredTickWidthPx:
number
Defined in: time/scale.ts:57
The density this preset intends: one tick occupies this many px when nothing else decides.
tickIncrement
tickIncrement:
number
Defined in: time/scale.ts:54
tickUnit
tickUnit:
TimeUnit
Defined in: time/scale.ts:53
The grid's step, with tickIncrement. Must be no coarser than the finest (last) header's own
step — a coarser tick would draw a grid the header disagrees with. resolvePreset throws
InvalidPresetError for a preset that breaks this rule.