Skip to main content

Function: wholeSpanUnlessSegments()

wholeSpanUnlessSegments(entry, variant, childrenAsSegments?): readonly Bar[]

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

Always one Bar, over the entry's whole span — the shape bar() and summary() both state (ADR 0023, ADR 0026). The registry's own default for a variant with no bars key: a former Segment is an ordinary child Entry now, so there is no second, narrower shape left to choose between — one Entry always draws one Bar over its own span.

Call: variants: [{ name: 'summary', when: (e) => e.hasChildren, bars: wholeSpanUnlessSegments }] — "the summary variant's bars: always one bar."

"Segmented" here means childrenAsSegments (#421 C2). Draws nothing for a row whose children childrenAsSegments already matched onto it: those children draw their own Bars through their own rows, so this producer's rail would paint a second bar over the same span. A consumer producer that ignores the parameter still draws — nothing else skips it.

Parameters​

entry​

Entry

variant​

string

childrenAsSegments?​

boolean = false

Returns​

readonly Bar[]