Skip to main content
cngx-src documentation

CngxChartBuffer

Interface

projects/common/chart/buffer/inject-chart-buffer.ts

Import#

import { CngxChartBuffer } from '@cngx/common/chart'

Description#

The realtime feed handle returned by injectChartBuffer. Bind points to a chart data input; drive it from any high-frequency producer via push / pushBatch.

Index#

Instance Properties#

capacity#number
Readonly

The fixed ring capacity.

length#Signal
Readonly

Current retained row count, 0..capacity, reflecting the last flush.

pendingFlush#Signal
Readonly

true while a flush is scheduled but not yet applied - drive a busy hint.

points#Signal
Readonly

The current (optionally downsampled) window, rAF-coalesced. Carries an element-wise equal guard so a flush reselecting the same rows does not cascade downstream.

Methods#

clear#void

Empty the ring; the emptied window emits on the next flush.

push#void
push(value: T)

Append one row; schedules a flush for the next animation frame.

@paramvalueT
pushBatch#void
pushBatch(values: unknown)

Append many rows in order; schedules a single flush.

@paramvaluesunknown