Skip to content

Documentation / @finchart/core / index / ConflatedOptions

Interface: ConflatedOptions<T> ​

Defined in: packages/core/src/extensions/conflate.ts:25

Type Parameters ​

T ​

T extends BaseDataPoint

Properties ​

merge? ​

optional merge?: (pending, incoming) => T

Defined in: packages/core/src/extensions/conflate.ts:45

How two same-bar ticks fold into one. Defaults to last-wins, which is right for the common feed shape (each tick carries the whole current bar, already accumulated). A feed that sends partial updates keeps what it needs here — e.g. high: Math.max(pending.high, incoming.high).

Building bars from raw trades is aggregation's job, not this one's: barAggregator folds trades into a bar, and the bars it makes are what arrives here. Handing raw trades to this instead would merge them last-wins and throw away that frame's high and low.

Parameters ​

pending ​

T

incoming ​

T

Returns ​

T


schedule? ​

optional schedule?: SchedulerFactory

Defined in: packages/core/src/extensions/conflate.ts:33

When the pending tick is delivered. Defaults to frameScheduler() — once per animation frame, which is the point: the chart repaints once per frame anyway, so ticks between frames only need their latest state. Where there is no rAF (node, SSR) this falls back to immediate delivery — no conflation, same meaning.


xOf? ​

optional xOf?: (point) => number

Defined in: packages/core/src/extensions/conflate.ts:52

Where a tick sits on x, for telling a new bar from the same one. Defaults to point.x; pass the series' own getX when its coordinates read x from another field, or every tick would fold into one bar.

Parameters ​

point ​

T

Returns ​

number