Skip to content

Documentation / @finchart/core / index / syncX

Function: syncX() ​

syncX(a, b, ...more): () => void

Defined in: packages/core/src/extensions/sync.ts:53

Links the visible x range across charts — the wiring behind a symbol comparison screen.

Everything it's built from is an existing contract: xDomainChange (announces in data x) + setVisibleRange (sets in data x). Feedback is cut off with a per-strand flag — since the propagation is synchronous, the flag never has to survive past a single frame.

ts
const release = syncX(btcPlot, ethPlot);            // two
const release = syncX(btcPlot, ethPlot, xrpPlot);   // three or more — star wiring

With three or more, the first chart becomes the hub of a star. A change from a leaf propagates to the hub synchronously, and the hub's xDomainChange pulls the remaining leaves along.

Parameters ​

a ​

XSync

b ​

XSync

more ​

...XSync[]

Returns ​

() => void