Skip to main content

Interface: Bar

Defined in: layout/bars/bar.ts:25

Properties​

box?​

readonly optional box?: FixedBarBox

Defined in: layout/bars/bar.ts:53

A painted box the time scale does not size, or undefined for an ordinary span-and-floor box. A marker that must hold its size at every zoom — diamond()'s glyph is the shipped case — states it here.

Not centred on the entry's own start — barSpan (layout/frame.ts) centres a floored span on its own midpoint (ADR 0022), and 'center' follows that same rule so the two never disagree. The two answer the same question only when start === end.

barSpan honours this ahead of the span-and-floor path, and render/ stamps data-span="fixed". fixedWidthBar is the producer that sets it. readonly: the box a producer hoists is shared across every Bar it builds, so a write through one Bar's box would silently reach every other Bar that producer ever returns.


end​

end: Instant

Defined in: layout/bars/bar.ts:40


entryId​

entryId: EntryId

Defined in: layout/bars/bar.ts:27


id​

id: BarId

Defined in: layout/bars/bar.ts:26


label?​

optional label?: string

Defined in: layout/bars/bar.ts:38

A producer's own text for this bar — set it and this Bar owns its label, the most specific answer available. Omit it and layout/frame.ts's placeFrame fills it from a bound barLabelFor resolver instead — view/ builds one from the Gantt's own barLabels Field. The built-in producers (entryBar, wholeEntryBar, fixedWidthBar) never set this: an Entry's name is a Field like any other, read through formatValue, not restated here (#421 C5). FrameBar.label is the one resolved answer this feeds — always a string, never absent.


start​

start: Instant

Defined in: layout/bars/bar.ts:39


variant​

variant: string

Defined in: layout/bars/bar.ts:31

The variant this Bar draws as — the data-variant a consumer styles, and the key the paint and the capability seams resolve through (ADR 0018). A plain string: core never branches on the name, and nothing stores one.