Skip to main content

Interface: ViewPresetHeader

Defined in: time/scale.ts:43

What a caller states about a stepping cadence — declared here, not in scale.ts, because snapInstant/nextTickBoundary need the same shape one level below TimeScale.ticks; scale.ts re-exports it (ViewPresetHeader and TimeScale.ticks both key off it too, S1.7 §3.3) so a TickStep import from either module names one type.

Extends​

Properties​

alignTo?​

optional alignTo?: TimeUnit

Defined in: time/scale.ts:58

Cells start and end on boundaries of this finer unit, not on the band's own calendar boundary. A month band with alignTo: 'week' owns the weeks whose first day falls in that month, so its cells line up with the week band under it. Must be strictly finer than unit; resolvePreset throws InvalidPresetError otherwise. Named alignTo because snap means drag snapping.


format​

format: DateFormat

Defined in: time/scale.ts:44


heightPx?​

optional heightPx?: number

Defined in: time/scale.ts:53

The band's own height in px. Absent: the --fg-band-height token, then its default. A header with a two-line tick cell sets a taller band than one with a single line.


increment​

readonly increment: number

Defined in: time/snap.ts:27

Inherited from​

TickStep.increment


repeatCoarserUnits?​

optional repeatCoarserUnits?: boolean

Defined in: time/scale.ts:50

A coarser band earlier in headers (bands are coarsest first) that already spells out year or month makes this band drop that field from its own format by default — the day band under a month band reads "21", not "Sep 21, 2026" (S1.12 follow-up, header readability). Set true to keep this band's format exactly as written. No effect on a callback format: only Intl.DateTimeFormatOptions fields are ever inspected or stripped.


unit​

readonly unit: TimeUnit

Defined in: time/snap.ts:26

Inherited from​

TickStep.unit