OptionalboundariesThe domain positions of collapsed gaps strictly inside (from, to) —
each is the far edge of a removed gap (a session/day open, a post-break
re-open), i.e. where two non-adjacent times become adjacent on the axis.
A chart draws a session divider at each. Optional — a provider that
can't enumerate its gaps omits it, and the axis just collapses silently.
Ascending; excludes any boundary at the very domain start (no gap precedes it).
If value lies inside a removed gap, snap it down to the previous live instant; a value already live is returned unchanged. Out-of-domain behavior is implementation-defined (see clampUp).
If value lies inside a removed gap, snap it up to the next live instant; a value already live is returned unchanged. Behavior for a value outside the provider's whole domain is implementation-defined — identityDiscontinuity leaves it; a bounded provider (segmentDiscontinuity) may snap to its first live edge.
Return an independent copy of this provider.
Live (non-gap) domain distance from from to to. Signed: negative when to < from. Gap time between the two is not counted.
Advance value by amount live-milliseconds, skipping gaps. Inverse of distance.
The disjoint time-axis primitive: a d3fc-style discontinuity provider.
A
DiscontinuityProviderdescribes an axis whose domain is epoch-milliseconds but from which certain ranges — closed-market time — have been excised. It is the structural surface a@pond-ts/chartstrading-time scale consumes to map value → pixel while collapsing the gaps, and the same surface the calendar engine (later in this package) produces from a session schedule. Charts depends on the shape, never on this package (see the trading-calendar RFC).The five methods mirror d3fc's
discontinuity-scaleprovider so the semantics are the well-trodden ones:distance(a, b) === -distance(b, a).distance(offset(a, distance(a, b))lands onb, clamped out of any gap).