Interface: ViewPreset
Defined in: time/scale.ts:62
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:69
id
id:
string
Defined in: time/scale.ts:63
minTickWidthPx?
optionalminTickWidthPx?:number
Defined in: time/scale.ts:74
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:71
The density this preset intends: one tick occupies this many px when nothing else decides.
tickIncrement
tickIncrement:
number
Defined in: time/scale.ts:68
tickUnit
tickUnit:
TimeUnit
Defined in: time/scale.ts:67
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.