Skip to content

Financial series

Read as Markdown

Import rendering from @pibbl/core/viz and optional queries from @pibbl/core/viz/inspection. VolumeSeries places numeric UTC-millisecond records on a time scale with an independent numeric volume scale. It does not sort, aggregate, mutate records, infer sessions, or execute queries during rendering.

import {
BaselineSeries,
LinearScale,
UTCScale,
VolumeSeries,
bollingerBands,
movingAverageConvergenceDivergence,
padLinearDomain,
percentageReturns,
relativeStrengthIndex,
stochasticOscillator,
visibleOhlcPriceExtent,
} from "@pibbl/core/viz";
const baseTime = Date.UTC(2026, 0, 2, 16);
const prices = [
{ time: baseTime, close: 100 },
{ time: baseTime + 86_400_000, close: 104 },
{ time: baseTime + 2 * 86_400_000, close: 102 },
] as const;
const bars = [
{ time: baseTime, open: 99, high: 103, low: 98, close: 100 },
{ time: baseTime + 86_400_000, open: 100, high: 106, low: 99, close: 104 },
{
time: baseTime + 2 * 86_400_000,
open: 104,
high: 105,
low: 101,
close: 102,
},
] as const;
const candles = bars;
const trading = {
logicalRange: [0, 2] as const,
slotAtTime(time: number): number | undefined {
const slot = bars.findIndex((bar) => bar.time === time);
return slot < 0 ? undefined : slot;
},
};
const entryPrice = 101;
function Volumes() {
return (
<UTCScale id="time" domain={[1000, 2000]} range={[20, 180]}>
<LinearScale id="volume" domain={[0, 100]} range={[100, 20]}>
<VolumeSeries
data={[
{ time: 1000, volume: 20 },
{ time: 2000, volume: 60 },
]}
time="time"
volume="volume"
xScale="time"
yScale="volume"
style={{ width: 12, fill: "#087f8c" }}
/>
</LinearScale>
</UTCScale>
);
}

The baseline is zero. Zero-volume rows remain inspectable but paint no rectangle. Missing/nonfinite accessor values skip a row; finite negative volume rejects. defined runs before accessors. Every result preserves the original datum and source index, including indices before skipped rows. Style callbacks are plain, hook-free functions. style.width is positive local logical units; default width is 70% of the smallest positive adjacent mapped spacing, capped at 12 (singleton fallback 8). Colors are application policy, not an implied financial meaning. Adjacent equal styles share paint paths; no child component is created per row.

useVolumeInspection(inputs) infers datum types from data/time/volume without reading or subscribing to them. Pass its stable ref to one VolumeSeries’s inspection. rendered() returns the last committed generation or undefined before paint/after disposal. Borrowed values expire on the next root generation or disposal, using the same ownership, transforms and clips as other inspection.

nearestRecordedVolumeX(rendered, { time, filter? }) returns a NearestVolumeHit or undefined. time and timeDelta use UTC milliseconds. Ties choose first source index. Default eligibility includes observations outside clips; opt in with filter: candidate => candidate.anchorInsideClips() to test the volume endpoint. Filters receive captured values and the caller-owned original record.

paintedVolumeAt(rendered, { rootPoint }) returns a PaintedVolumeHit or undefined. It inverse-transforms root-logical coordinates, applies committed clips and examines fill/stroke coverage in reverse source order. Zero-height columns, transparent opacity, gaps and singular transforms return no result. Geometric coverage does not perform scene-wide occlusion or pixel-alpha analysis.

Both hits contain datum, sourceIndex, time, volume, baseline: 0, anchorLocal, anchorRoot, and boundsLocal. Bounds and local anchors are in series-local logical units; root anchors use Pibbl event coordinates. Calculated values are copied at paint; original datum objects remain application-owned. timeAtRoot(rootPoint) supplies the committed inverse mapping.

Use the existing withInspection adapter when event-local pinning and memoized requests are useful. Ordinary events are unchanged and no query executes until requested. Copy values into application state if they must outlive the borrowed generation. See rendered series inspection.

TradingTimeScale accepts timestamps, optional controlled logicalRange, and range. Timestamps are safe UTC-millisecond integers, strictly increasing and unique. They occupy consecutive logical slots even across absent observations. This compresses observations, without exchange-calendar inference. UTCScale continues to map elapsed time. Default viewport is half a slot before/after the supplied observations; empty/singleton viewports are finite.

useTradingTimeScale(id) supplies explicit operations: map(time) accepts only a supplied timestamp and rejects unknown values; mapSlot(slot) maps fractional slots/whitespace; slotAtTime(time) and timeAtSlot(slot) are exact lookups with undefined misses. slotAtPosition(position) returns a fractional logical slot; nearestTimeAtPosition(position) selects supplied UTC timestamps, ties earlier, clamped to supplied endpoints, undefined for empty data. There is no ambiguous UTC interpolation or overloaded inverse method.

Axis ticks choose visible supplied timestamps; formatting is ISO UTC by default. Line, point, area, interval-band, custom Plot and ScaleAdjust use the same exact map. The public continuous-scale hook and numeric navigation contracts are unchanged; trading has a dedicated hook. Pan/zoom by updating logicalRange in slot units, rather than changing timestamps. When prepending history, preserve the application’s chosen timestamp anchor by adding the inserted observation count to both controlled logical endpoints. No hidden viewport state is retained.

Legacy HoverData uses numeric continuous scales and does not accept a trading-time mapping. Use the optional captured inspection APIs and explicit timeAtRoot lookup for supplied trading observations.

visibleOhlcPriceExtent(data, options) returns frozen ascending [low, high] endpoints from complete candles whose positionAtTime(time) lies inside the inclusive visibleRange. The callback makes the coordinate system explicit: use UTC milliseconds for elapsed-time windows, or slotAtTime and logicalRange for trading time. Fractional slot windows include only contained candle centers; partly painted wicks do not change the selection. An undefined position excludes a row. No records are sorted, mutated, or interpolated.

Missing or nonfinite time/OHLC values skip the whole row. defined runs before any accessor. A finite malformed eligible candle rejects when low is above an open/close or high is below one. An empty visible selection returns undefined.

const extent = visibleOhlcPriceExtent(bars, {
time: "time",
open: "open",
high: "high",
low: "low",
close: "close",
positionAtTime: (time) => trading.slotAtTime(time),
visibleRange: trading.logicalRange,
});
const domain = extent
? padLinearDomain(extent, { padding: 0.08, minimumSpan: 0.02 })
: undefined;

padLinearDomain(domain, { padding, minimumSpan }) applies equal padding on both sides, defaults to 10% per side, and preserves input direction. It expands flat domains before padding using minimumSpan, or max(abs(value) * 0.02, 1) when no floor is supplied. Inputs and the result must be finite; the returned frozen endpoints are always distinct. Keep manual domains as ordinary application state. For logarithmic presentation, first confirm every visible low is positive, pad the logged domain, and exponentiate; these helpers do not select a scale mode.

percentageReturns(data, { time, value, baseTime, defined? }) computes cumulative simple return from an exact common base observation: (value - base) / base * 100. This is change from the base, not the return between adjacent observations. indexTo100 accepts the same named inputs and computes value / base * 100. The base maps exactly to 0 or 100; observations are never rounded.

const comparison = percentageReturns(prices, {
time: "time",
value: "close",
baseTime: Date.UTC(2026, 0, 2, 16),
});
if (comparison) {
// LineSeries: x="time", y="returnPercent". Use the same baseTime for every asset.
}

The result is a frozen source-ordered array of frozen points containing the original datum, sourceIndex, time, and returnPercent or indexValue. Datum references remain caller owned. Missing/nonfinite coordinates or values produce null gaps. defined runs before accessors and excluded rows become gaps. Known missing observations must be explicit null-value rows; these helpers do not infer a calendar.

baseTime must be a safe integer UTC millisecond within the platform Date range. An absent eligible complete exact base returns undefined; render an unavailable asset status. Multiple eligible complete base records, a nonpositive base price, or a nonfinite derived result throw. Later finite negative prices remain actual observations. No nearest-date fallback, per-asset rebasing, sorting or mutation occurs. Changing the viewport does not change the base.

For percentage labels use formatNumber(value, { suffix: "%" }): these values already express percentage points. An Intl percent formatter would multiply them by 100 again. Formatting belongs to presentation and uses Intl.NumberFormat.

simpleMovingAverage(data, { value, period, defined? }) and exponentialMovingAverage(data, { value, period, defined? }) return frozen, source-aligned MovingAveragePoint rows with datum, sourceIndex, and average. period is a positive safe integer. A result stays null until the window contains period consecutive eligible finite values. Missing, nonfinite, and excluded rows return null and reset warmup; defined runs before value.

SMA uses the trailing arithmetic mean. EMA seeds with that first complete SMA and then uses 2 / (period + 1) as its smoothing factor. These helpers do not fill gaps, choose dates, sort data, or mutate source rows.

bollingerBands(data, { value, period, multiplier?, defined? }) uses the same consecutive windows and returns frozen BollingerBandPoint rows with mean, lower, and upper. It uses population standard deviation and a finite non-negative multiplier, defaulting to 2. A band result is null during warmup or after a reset. Derived nonfinite values reject rather than silently clip.

const bands = bollingerBands(prices, {
value: "close",
period: 20,
multiplier: 2,
});
// LineSeries: y="mean", y="lower", or y="upper".

relativeStrengthIndex(data, { value, period, defined? }) returns frozen, source-aligned RelativeStrengthIndexPoint rows. Wilder smoothing seeds after period consecutive price changes, so the first value needs period + 1 consecutive prices. Flat gains and losses yield 50; gain-only and loss-only windows yield 100 and 0. Gaps reset the seed.

movingAverageConvergenceDivergence(data, { value, fastPeriod, slowPeriod, signalPeriod, defined? }) returns aligned macd, signal, and histogram fields. The fast period must be smaller than the slow period. Both price EMAs use SMA seeds; MACD appears once both are available, while the signal and histogram wait for signalPeriod MACD values.

stochasticOscillator(data, { high, low, close, lookbackPeriod, kPeriod, dPeriod, defined? }) returns rawK, smoothed k, and d fields. All periods are positive safe integers. Every finite candle must satisfy low <= close <= high. A zero trailing range returns null and resets only %K/%D smoothing, preserving the complete OHLC row in the rolling range. Missing, nonfinite, and excluded records reset warmup in every oscillator; accessors run only after defined.

const rsi = relativeStrengthIndex(prices, { value: "close", period: 14 });
const macd = movingAverageConvergenceDivergence(prices, {
value: "close",
fastPeriod: 12,
slowPeriod: 26,
signalPeriod: 9,
});
const stochastic = stochasticOscillator(candles, {
high: "high",
low: "low",
close: "close",
lookbackPeriod: 14,
kPeriod: 3,
dPeriod: 3,
});

CandlestickSeries accepts original data, named time/open/high/low/close accessors, xScale/yScale IDs, defined, named style.body/style.wick, and optional inspection. Missing/nonfinite fields skip the whole candle. Finite malformed OHLC rejects with its source index: low must be <= both open/close and high >= both. Equal open/close paints a centered one-local-unit doji. Body bandwidth defaults to automatic 70% spacing capped at 12, with singleton fallback 8; explicit widths are positive local units. Body and wick paint are independent. Defaults use teal for close >= open and coral otherwise; the application may supply its own policy. Disjoint adjacent equal styles share paths; overlapping records keep sequential paint, including translucent fills and strokes.

useCandleInspection(inputs) owns the same optional capture foundation as volume. nearestRecordedCandleX(rendered, { time, filter? }) selects original OHLC (never interpolates it), adds timeDelta, and breaks ties by first source index. paintedCandleAt(rendered, { rootPoint }) respects transforms/clips, returns the last matching source candle and part: "body" | "wick", and tests the body before its underlying wick. Results preserve captured time/open/high/low/close, original datum/sourceIndex, close endpoint anchors and body/wick local geometry. Empty queries return undefined; stale generations throw. The optional typed filter exposes anchorInsideClips() for explicit close-endpoint eligibility.

OhlcBarSeries accepts the same original data, time/open/high/low/close, scales, defined, event, pointer, and inspection inputs as CandlestickSeries. It paints a high/low stem, a left-facing open tick, and a right-facing close tick. Its shared style accepts bandwidth, stroke, strokeWidth, opacity, and cursor; a callback receives the original datum, source index, and complete data. Missing/nonfinite values skip the complete bar and finite malformed OHLC rejects.

useOhlcBarInspection(inputs) captures original data and evaluated OHLC values. nearestRecordedOhlcBarX(rendered, { time, filter? }) returns the nearest original bar with timeDelta. paintedOhlcBarAt(rendered, { rootPoint }) respects committed transforms and clips and returns part: "stem" | "openTick" | "closeTick" for the last painted matching segment. Results retain original datum/sourceIndex, close anchors, and frozen local stem/open/close tick geometry; stale generations throw.

BaselineSeries draws linear connections with independently colored lines and filled regions above and below an explicit finite data-space baseline. It uses data, x, y, xScale, yScale, defined, and optional numeric inspection. baseline and data can be signals. Missing/nonfinite observations split runs; synthetic crossing geometry never becomes an inspection observation.

style.above and style.below accept fill and stroke paints. fillOpacity defaults to 0.2 and affects only fills; strokeWidth defaults to 2. Equal values use the above stroke and have no area. Linear interpolation is explicit; there is no curve-selection option in this initial component.

<BaselineSeries
data={prices}
x="time"
y="close"
xScale="time"
yScale="price"
baseline={entryPrice}
style={{
above: { fill: "#29c7ab", stroke: "#00876e" },
below: { fill: "#ed6975", stroke: "#cb4057" },
fillOpacity: 0.22,
strokeWidth: 1.5,
}}
/>

Financial event markers compose existing PlotSeries with application-owned keyed glyphs, labels and focusable hit regions. The application owns fill selection, coincident-event ordering and clipping policy. Execution Journal shows this composition with simulated buy/sell fills and a selectable entry baseline; it does not add a public marker component.

aggregateOhlcv(data, options) preserves chronological source order and combines complete records within explicit half-open { start, end } buckets. Accessors supply time, open, high, low, close, and volume; bucket(time) supplies bounds or null to exclude a timestamp. defined excludes before accessors run. First open, maximum high, minimum low, last close and summed volume form each frozen AggregatedOhlcvPoint. Frozen sources retain original datum/index pairs. It creates no empty buckets and does not determine whether a bucket is final. Missing inputs skip; descending finite times, inconsistent/overlapping bounds, malformed finite OHLC, negative volume and volume overflow reject. Source records remain caller-owned and are not frozen or mutated.

sessionVwap(data, { price, volume, session, defined? }) returns one frozen point per original record. Session IDs are strings or finite numbers supplied by a property or callback. Every session change resets accumulation, including an excluded first observation. Session resolves before defined; excluded rows skip price and volume accessors, report their session and produce null VWAP. Missing price/volume also produces null while preserving that session’s prior state. Zero volume preserves prior VWAP, or null before the first positive volume. Negative volume and cumulative volume overflow reject. Weighted price arithmetic avoids intermediate price-times-volume overflow. Results include original datum, sourceIndex, session, cumulativeVolume and vwap. The function does not infer a calendar, reorder data or deduplicate observations.

Trade price and quantity produce trade-based VWAP. Typical bar price (high + low + close) / 3 and bar volume produce an approximation; the caller must label that choice. Derive VWAP from the full source session before slicing the view or aggregating the display timeframe to preserve a consistent study.

Live updates use ordinary signals: replace the current immutable record or append a new record and publish the new array. The application owns feed lifetime, retention, follow-latest policy and historical inspection. Existing chart and animation APIs continue to own rendering and navigation.

Creates a stable optional volume receiver without reading data or subscribing.

useVolumeInspection: <D>(_inputs: Pick<VolumeSeriesProps<D>, "data" | "time" | "volume">) => VolumeInspectionRef<D>

Related API: useVolumeInspection, VolumeSeriesProps, VolumeInspectionRef.

  • _inputs — Data/accessors used only for original datum inference.

Ref to pass to exactly one VolumeSeries inspection prop.

VolumeInspectionRef

View source — packages/core/src/features/viz/inspection/volume.ts:97

Selects a recorded volume by timestamp; equal distances choose first source index.

nearestRecordedVolumeX: <D>(rendered: VolumeRenderedSeries<D>, options: { time: number; filter?: (observation: VolumeInspectionCandidate<D>) => boolean; }) => NearestVolumeHit<D> | undefined

Related API: nearestRecordedVolumeX, VolumeRenderedSeries, VolumeInspectionCandidate, NearestVolumeHit.

  • rendered — Borrowed committed volume values.

  • options — UTC-millisecond request and optional pure candidate filter.

Captured original volume and time delta, or undefined when no candidate survives.

NearestVolumeHit

View source — packages/core/src/features/viz/inspection/volume.ts:171

Finds the last-painted volume column covering a root-logical point.

paintedVolumeAt: <D>(rendered: VolumeRenderedSeries<D>, options: { rootPoint: Readonly<RenderedSeriesPoint>; }) => PaintedVolumeHit<D> | undefined

Related API: paintedVolumeAt, VolumeRenderedSeries, RenderedSeriesPoint, PaintedVolumeHit.

  • rendered — Borrowed committed volume values and paint geometry.

  • options — Root-logical point; respects clips, zero height and source paint order.

Captured original volume, or undefined for gaps/singular transforms.

PaintedVolumeHit

View source — packages/core/src/features/viz/inspection/volume.ts:200

One original volume record and the values/geometry evaluated during paint.

interface VolumeObservation<D>

Related API: VolumeObservation.

useVolumeInspection

View source — packages/core/src/features/viz/inspection/volume.ts:18

datum
readonly datum: D

Caller-owned original record.

View source — packages/core/src/features/viz/inspection/volume.ts:19

sourceIndex
readonly sourceIndex: number

Original index including skipped rows.

View source — packages/core/src/features/viz/inspection/volume.ts:20

time
readonly time: number

Evaluated UTC milliseconds.

View source — packages/core/src/features/viz/inspection/volume.ts:21

volume
readonly volume: number

Evaluated nonnegative volume.

View source — packages/core/src/features/viz/inspection/volume.ts:22

baseline
readonly baseline: 0

Zero-volume baseline.

View source — packages/core/src/features/viz/inspection/volume.ts:23

anchorLocal
readonly anchorLocal: Readonly<RenderedSeriesPoint>

Related API: RenderedSeriesPoint.

Volume endpoint in series-local logical coordinates.

View source — packages/core/src/features/viz/inspection/volume.ts:24

anchorRoot
readonly anchorRoot: Readonly<RenderedSeriesPoint>

Related API: RenderedSeriesPoint.

Volume endpoint in root-logical coordinates.

View source — packages/core/src/features/viz/inspection/volume.ts:25

boundsLocal
readonly boundsLocal: Readonly<LayoutBox>

Related API: LayoutBox.

Column bounds in series-local logical coordinates.

View source — packages/core/src/features/viz/inspection/volume.ts:26

A nearest-time candidate with an explicit optional clip predicate.

interface VolumeInspectionCandidate<D> extends VolumeObservation<D>

Related API: VolumeInspectionCandidate, VolumeObservation.

useVolumeInspection

View source — packages/core/src/features/viz/inspection/volume.ts:31

anchorInsideClips
anchorInsideClips: () => boolean

Related API: anchorInsideClips.

Whether the endpoint lies inside every committed clip.

View source — packages/core/src/features/viz/inspection/volume.ts:32

datum
readonly datum: D

Caller-owned original record.

View source — packages/core/src/features/viz/inspection/volume.ts:19

sourceIndex
readonly sourceIndex: number

Original index including skipped rows.

View source — packages/core/src/features/viz/inspection/volume.ts:20

time
readonly time: number

Evaluated UTC milliseconds.

View source — packages/core/src/features/viz/inspection/volume.ts:21

volume
readonly volume: number

Evaluated nonnegative volume.

View source — packages/core/src/features/viz/inspection/volume.ts:22

baseline
readonly baseline: 0

Zero-volume baseline.

View source — packages/core/src/features/viz/inspection/volume.ts:23

anchorLocal
readonly anchorLocal: Readonly<RenderedSeriesPoint>

Related API: RenderedSeriesPoint.

Volume endpoint in series-local logical coordinates.

View source — packages/core/src/features/viz/inspection/volume.ts:24

anchorRoot
readonly anchorRoot: Readonly<RenderedSeriesPoint>

Related API: RenderedSeriesPoint.

Volume endpoint in root-logical coordinates.

View source — packages/core/src/features/viz/inspection/volume.ts:25

boundsLocal
readonly boundsLocal: Readonly<LayoutBox>

Related API: LayoutBox.

Column bounds in series-local logical coordinates.

View source — packages/core/src/features/viz/inspection/volume.ts:26

A recorded volume selected by timestamp proximity.

interface NearestVolumeHit<D> extends VolumeObservation<D>

Related API: NearestVolumeHit, VolumeObservation.

useVolumeInspection

View source — packages/core/src/features/viz/inspection/volume.ts:37

timeDelta
readonly timeDelta: number

Absolute UTC-millisecond distance from the requested time.

View source — packages/core/src/features/viz/inspection/volume.ts:38

datum
readonly datum: D

Caller-owned original record.

View source — packages/core/src/features/viz/inspection/volume.ts:19

sourceIndex
readonly sourceIndex: number

Original index including skipped rows.

View source — packages/core/src/features/viz/inspection/volume.ts:20

time
readonly time: number

Evaluated UTC milliseconds.

View source — packages/core/src/features/viz/inspection/volume.ts:21

volume
readonly volume: number

Evaluated nonnegative volume.

View source — packages/core/src/features/viz/inspection/volume.ts:22

baseline
readonly baseline: 0

Zero-volume baseline.

View source — packages/core/src/features/viz/inspection/volume.ts:23

anchorLocal
readonly anchorLocal: Readonly<RenderedSeriesPoint>

Related API: RenderedSeriesPoint.

Volume endpoint in series-local logical coordinates.

View source — packages/core/src/features/viz/inspection/volume.ts:24

anchorRoot
readonly anchorRoot: Readonly<RenderedSeriesPoint>

Related API: RenderedSeriesPoint.

Volume endpoint in root-logical coordinates.

View source — packages/core/src/features/viz/inspection/volume.ts:25

boundsLocal
readonly boundsLocal: Readonly<LayoutBox>

Related API: LayoutBox.

Column bounds in series-local logical coordinates.

View source — packages/core/src/features/viz/inspection/volume.ts:26

A recorded volume whose painted column covers the query point.

interface PaintedVolumeHit<D> extends VolumeObservation<D>

Related API: PaintedVolumeHit, VolumeObservation.

useVolumeInspection

View source — packages/core/src/features/viz/inspection/volume.ts:43

datum
readonly datum: D

Caller-owned original record.

View source — packages/core/src/features/viz/inspection/volume.ts:19

sourceIndex
readonly sourceIndex: number

Original index including skipped rows.

View source — packages/core/src/features/viz/inspection/volume.ts:20

time
readonly time: number

Evaluated UTC milliseconds.

View source — packages/core/src/features/viz/inspection/volume.ts:21

volume
readonly volume: number

Evaluated nonnegative volume.

View source — packages/core/src/features/viz/inspection/volume.ts:22

baseline
readonly baseline: 0

Zero-volume baseline.

View source — packages/core/src/features/viz/inspection/volume.ts:23

anchorLocal
readonly anchorLocal: Readonly<RenderedSeriesPoint>

Related API: RenderedSeriesPoint.

Volume endpoint in series-local logical coordinates.

View source — packages/core/src/features/viz/inspection/volume.ts:24

anchorRoot
readonly anchorRoot: Readonly<RenderedSeriesPoint>

Related API: RenderedSeriesPoint.

Volume endpoint in root-logical coordinates.

View source — packages/core/src/features/viz/inspection/volume.ts:25

boundsLocal
readonly boundsLocal: Readonly<LayoutBox>

Related API: LayoutBox.

Column bounds in series-local logical coordinates.

View source — packages/core/src/features/viz/inspection/volume.ts:26

Mount-owned optional volume capture.

interface VolumeInspectionRef<D>

Related API: VolumeInspectionRef.

useVolumeInspection

View source — packages/core/src/features/viz/inspection/volume.ts:80

rendered
rendered: () => VolumeRenderedSeries<D> | undefined

Related API: VolumeRenderedSeries.

Borrowed committed values, or undefined before paint/after disposal.

View source — packages/core/src/features/viz/inspection/volume.ts:81

capture
capture: (input: { marks: readonly CapturedVolumeMark<D>[]; xScale: NumericPositionScale; yScale: ResolvedContinuousScale; }) => void

Related API: ResolvedContinuousScale.

  • input — Immutable local marks and committed time mapping.

View source — packages/core/src/features/viz/inspection/volume.ts:85

Borrowed committed volume values; expires after a new root generation or disposal.

interface VolumeRenderedSeries<D>

Related API: VolumeRenderedSeries.

useVolumeInspection

View source — packages/core/src/features/viz/inspection/volume.ts:57

observations
readonly observations: readonly VolumeObservation<D>[]

Related API: VolumeObservation.

Original observations and evaluated values in source order.

View source — packages/core/src/features/viz/inspection/volume.ts:58

assertLive
assertLive: () => void

Throws when borrowed values are stale or disposed.

View source — packages/core/src/features/viz/inspection/volume.ts:59

timeAtRoot
timeAtRoot: (pointRoot: Readonly<RenderedSeriesPoint>) => number | undefined

Related API: RenderedSeriesPoint.

Inverts a root-logical point to UTC milliseconds.

  • pointRoot — Root-logical Canvas position.

Timestamp or undefined for unavailable inversion.

View source — packages/core/src/features/viz/inspection/volume.ts:63

anchorInsideClips
anchorInsideClips: (pointLocal: Readonly<RenderedSeriesPoint>) => boolean

Related API: anchorInsideClips, RenderedSeriesPoint.

Tests a local point against the committed clip stack.

  • pointLocal — Series-local position.

Whether every clip includes it.

View source — packages/core/src/features/viz/inspection/volume.ts:67

marks
readonly marks: readonly CapturedVolumeMark<D>[]

View source — packages/core/src/features/viz/inspection/volume.ts:68

numeric
readonly numeric: NumericRenderedSeries<D>

Related API: NumericRenderedSeries.

View source — packages/core/src/features/viz/inspection/volume.ts:69

localAtRoot
localAtRoot: (point: Readonly<RenderedSeriesPoint>) => Readonly<RenderedSeriesPoint> | undefined

Related API: RenderedSeriesPoint.

  • point — Root-logical position.

Local position or undefined for a singular transform.

View source — packages/core/src/features/viz/inspection/volume.ts:73

Creates a stable optional candle receiver without reading data or subscribing.

useCandleInspection: <D>(_inputs: Pick<CandlestickSeriesProps<D>, "data" | "time" | "open" | "high" | "low" | "close">) => CandleInspectionRef<D>

Related API: useCandleInspection, CandlestickSeriesProps, CandleInspectionRef.

  • _inputs — Inputs retained only to infer the original datum type.

A ref for exactly one CandlestickSeries inspection prop.

CandleInspectionRef

View source — packages/core/src/features/viz/inspection/candle.ts:152

Selects a captured candle nearest to a requested UTC timestamp.

nearestRecordedCandleX: <D>(rendered: CandleRenderedSeries<D>, options: { time: number; filter?: (observation: CandleInspectionCandidate<D>) => boolean; }) => NearestCandleHit<D> | undefined

Related API: nearestRecordedCandleX, CandleRenderedSeries, CandleInspectionCandidate, NearestCandleHit.

  • rendered — Borrowed committed candle generation.

  • options — Timestamp and optional pure candidate filter.

The first source-order candle on a tie, or undefined when none qualifies.

NearestCandleHit

View source — packages/core/src/features/viz/inspection/candle.ts:234

Finds the last-painted candle body or wick covering a root-logical point.

Body coverage is tested before wick coverage because a candle paints its body after its wick.

paintedCandleAt: <D>(rendered: CandleRenderedSeries<D>, options: { rootPoint: Readonly<RenderedSeriesPoint>; }) => PaintedCandleHit<D> | undefined

Related API: paintedCandleAt, CandleRenderedSeries, RenderedSeriesPoint, PaintedCandleHit.

  • rendered — Borrowed committed candle generation.

  • options — Root-logical point; clips and singular transforms produce no result.

Captured candle and painted part, or undefined for gaps and unpainted geometry.

PaintedCandleHit

View source — packages/core/src/features/viz/inspection/candle.ts:309

One original candle with its evaluated OHLC values and committed local geometry.

interface CandleObservation<D>

Related API: CandleObservation.

CandleRenderedSeries

View source — packages/core/src/features/viz/inspection/candle.ts:18

datum
readonly datum: D

Caller-owned original record.

View source — packages/core/src/features/viz/inspection/candle.ts:20

sourceIndex
readonly sourceIndex: number

Original source index, including skipped records.

View source — packages/core/src/features/viz/inspection/candle.ts:22

time
readonly time: number

Evaluated UTC-millisecond timestamp.

View source — packages/core/src/features/viz/inspection/candle.ts:24

open
readonly open: number

Evaluated opening value.

View source — packages/core/src/features/viz/inspection/candle.ts:26

high
readonly high: number

Evaluated high value.

View source — packages/core/src/features/viz/inspection/candle.ts:28

low
readonly low: number

Evaluated low value.

View source — packages/core/src/features/viz/inspection/candle.ts:30

close
readonly close: number

Evaluated closing value.

View source — packages/core/src/features/viz/inspection/candle.ts:32

anchorLocal
readonly anchorLocal: Readonly<RenderedSeriesPoint>

Related API: RenderedSeriesPoint.

Closing endpoint in series-local logical units.

View source — packages/core/src/features/viz/inspection/candle.ts:34

anchorRoot
readonly anchorRoot: Readonly<RenderedSeriesPoint>

Related API: RenderedSeriesPoint.

Closing endpoint in root-logical units.

View source — packages/core/src/features/viz/inspection/candle.ts:36

bodyBoundsLocal
readonly bodyBoundsLocal: Readonly<LayoutBox>

Related API: LayoutBox.

Body rectangle before world transforms.

View source — packages/core/src/features/viz/inspection/candle.ts:38

wickLocal
readonly wickLocal: Readonly<{ x: number; lowY: number; highY: number; }>

Wick center and endpoints before world transforms.

View source — packages/core/src/features/viz/inspection/candle.ts:40

A candle candidate whose closing endpoint can be tested against committed clips.

interface CandleInspectionCandidate<D> extends CandleObservation<D>

Related API: CandleInspectionCandidate, CandleObservation.

CandleObservation

View source — packages/core/src/features/viz/inspection/candle.ts:53

anchorInsideClips
anchorInsideClips: () => boolean

Related API: anchorInsideClips.

Whether the close anchor lies inside every committed clip.

View source — packages/core/src/features/viz/inspection/candle.ts:57

datum
readonly datum: D

Caller-owned original record.

View source — packages/core/src/features/viz/inspection/candle.ts:20

sourceIndex
readonly sourceIndex: number

Original source index, including skipped records.

View source — packages/core/src/features/viz/inspection/candle.ts:22

time
readonly time: number

Evaluated UTC-millisecond timestamp.

View source — packages/core/src/features/viz/inspection/candle.ts:24

open
readonly open: number

Evaluated opening value.

View source — packages/core/src/features/viz/inspection/candle.ts:26

high
readonly high: number

Evaluated high value.

View source — packages/core/src/features/viz/inspection/candle.ts:28

low
readonly low: number

Evaluated low value.

View source — packages/core/src/features/viz/inspection/candle.ts:30

close
readonly close: number

Evaluated closing value.

View source — packages/core/src/features/viz/inspection/candle.ts:32

anchorLocal
readonly anchorLocal: Readonly<RenderedSeriesPoint>

Related API: RenderedSeriesPoint.

Closing endpoint in series-local logical units.

View source — packages/core/src/features/viz/inspection/candle.ts:34

anchorRoot
readonly anchorRoot: Readonly<RenderedSeriesPoint>

Related API: RenderedSeriesPoint.

Closing endpoint in root-logical units.

View source — packages/core/src/features/viz/inspection/candle.ts:36

bodyBoundsLocal
readonly bodyBoundsLocal: Readonly<LayoutBox>

Related API: LayoutBox.

Body rectangle before world transforms.

View source — packages/core/src/features/viz/inspection/candle.ts:38

wickLocal
readonly wickLocal: Readonly<{ x: number; lowY: number; highY: number; }>

Wick center and endpoints before world transforms.

View source — packages/core/src/features/viz/inspection/candle.ts:40

Candle selected by nearest timestamp.

interface NearestCandleHit<D> extends CandleObservation<D>

Related API: NearestCandleHit, CandleObservation.

nearestRecordedCandleX

View source — packages/core/src/features/viz/inspection/candle.ts:63

timeDelta
readonly timeDelta: number

Absolute UTC-millisecond distance from the requested timestamp.

View source — packages/core/src/features/viz/inspection/candle.ts:65

datum
readonly datum: D

Caller-owned original record.

View source — packages/core/src/features/viz/inspection/candle.ts:20

sourceIndex
readonly sourceIndex: number

Original source index, including skipped records.

View source — packages/core/src/features/viz/inspection/candle.ts:22

time
readonly time: number

Evaluated UTC-millisecond timestamp.

View source — packages/core/src/features/viz/inspection/candle.ts:24

open
readonly open: number

Evaluated opening value.

View source — packages/core/src/features/viz/inspection/candle.ts:26

high
readonly high: number

Evaluated high value.

View source — packages/core/src/features/viz/inspection/candle.ts:28

low
readonly low: number

Evaluated low value.

View source — packages/core/src/features/viz/inspection/candle.ts:30

close
readonly close: number

Evaluated closing value.

View source — packages/core/src/features/viz/inspection/candle.ts:32

anchorLocal
readonly anchorLocal: Readonly<RenderedSeriesPoint>

Related API: RenderedSeriesPoint.

Closing endpoint in series-local logical units.

View source — packages/core/src/features/viz/inspection/candle.ts:34

anchorRoot
readonly anchorRoot: Readonly<RenderedSeriesPoint>

Related API: RenderedSeriesPoint.

Closing endpoint in root-logical units.

View source — packages/core/src/features/viz/inspection/candle.ts:36

bodyBoundsLocal
readonly bodyBoundsLocal: Readonly<LayoutBox>

Related API: LayoutBox.

Body rectangle before world transforms.

View source — packages/core/src/features/viz/inspection/candle.ts:38

wickLocal
readonly wickLocal: Readonly<{ x: number; lowY: number; highY: number; }>

Wick center and endpoints before world transforms.

View source — packages/core/src/features/viz/inspection/candle.ts:40

Candle part whose actual painted geometry covers a root-logical query point.

interface PaintedCandleHit<D> extends CandleObservation<D>

Related API: PaintedCandleHit, CandleObservation.

paintedCandleAt

View source — packages/core/src/features/viz/inspection/candle.ts:71

part
readonly part: "body" | "wick"

Part selected in source paint order: body paints after wick.

View source — packages/core/src/features/viz/inspection/candle.ts:73

datum
readonly datum: D

Caller-owned original record.

View source — packages/core/src/features/viz/inspection/candle.ts:20

sourceIndex
readonly sourceIndex: number

Original source index, including skipped records.

View source — packages/core/src/features/viz/inspection/candle.ts:22

time
readonly time: number

Evaluated UTC-millisecond timestamp.

View source — packages/core/src/features/viz/inspection/candle.ts:24

open
readonly open: number

Evaluated opening value.

View source — packages/core/src/features/viz/inspection/candle.ts:26

high
readonly high: number

Evaluated high value.

View source — packages/core/src/features/viz/inspection/candle.ts:28

low
readonly low: number

Evaluated low value.

View source — packages/core/src/features/viz/inspection/candle.ts:30

close
readonly close: number

Evaluated closing value.

View source — packages/core/src/features/viz/inspection/candle.ts:32

anchorLocal
readonly anchorLocal: Readonly<RenderedSeriesPoint>

Related API: RenderedSeriesPoint.

Closing endpoint in series-local logical units.

View source — packages/core/src/features/viz/inspection/candle.ts:34

anchorRoot
readonly anchorRoot: Readonly<RenderedSeriesPoint>

Related API: RenderedSeriesPoint.

Closing endpoint in root-logical units.

View source — packages/core/src/features/viz/inspection/candle.ts:36

bodyBoundsLocal
readonly bodyBoundsLocal: Readonly<LayoutBox>

Related API: LayoutBox.

Body rectangle before world transforms.

View source — packages/core/src/features/viz/inspection/candle.ts:38

wickLocal
readonly wickLocal: Readonly<{ x: number; lowY: number; highY: number; }>

Wick center and endpoints before world transforms.

View source — packages/core/src/features/viz/inspection/candle.ts:40

Mount-owned optional candle capture.

interface CandleInspectionRef<D>

Related API: CandleInspectionRef.

useCandleInspection

View source — packages/core/src/features/viz/inspection/candle.ts:126

rendered
rendered: () => CandleRenderedSeries<D> | undefined

Related API: CandleRenderedSeries.

The current borrowed generation, or undefined before paint and after disposal.

View source — packages/core/src/features/viz/inspection/candle.ts:130

capture
capture: (input: { marks: readonly CapturedCandleMark<D>[]; xScale: NumericPositionScale; yScale: ResolvedContinuousScale; }) => void

Related API: ResolvedContinuousScale.

  • input — Source-ordered marks and the committed numeric mappings.

View source — packages/core/src/features/viz/inspection/candle.ts:135

Borrowed committed candle generation.

interface CandleRenderedSeries<D>

Related API: CandleRenderedSeries.

CandleInspectionRef

View source — packages/core/src/features/viz/inspection/candle.ts:92

observations
readonly observations: readonly CandleObservation<D>[]

Related API: CandleObservation.

Captured original records, values, and geometry in source order.

View source — packages/core/src/features/viz/inspection/candle.ts:94

assertLive
assertLive: () => void

Throws after replacement or disposal.

View source — packages/core/src/features/viz/inspection/candle.ts:96

timeAtRoot
timeAtRoot: (pointRoot: Readonly<RenderedSeriesPoint>) => number | undefined

Related API: RenderedSeriesPoint.

Selects the supplied/nearest timestamp at a root-logical coordinate.

  • pointRoot — Root-logical point to invert through the committed transform.

UTC milliseconds, or undefined for singular transforms or empty mappings.

View source — packages/core/src/features/viz/inspection/candle.ts:102

anchorInsideClips
anchorInsideClips: (pointLocal: Readonly<RenderedSeriesPoint>) => boolean

Related API: anchorInsideClips, RenderedSeriesPoint.

Tests local geometry against each committed clip.

  • pointLocal — Series-local logical point.

Whether every committed clip contains the point.

View source — packages/core/src/features/viz/inspection/candle.ts:108

marks
readonly marks: readonly CapturedCandleMark<D>[]

View source — packages/core/src/features/viz/inspection/candle.ts:110

numeric
readonly numeric: NumericRenderedSeries<D>

Related API: NumericRenderedSeries.

View source — packages/core/src/features/viz/inspection/candle.ts:112

localAtRoot
localAtRoot: (point: Readonly<RenderedSeriesPoint>) => Readonly<RenderedSeriesPoint> | undefined

Related API: RenderedSeriesPoint.

  • point — Root-logical point to convert.

Series-local point, or undefined when the transform is singular.

View source — packages/core/src/features/viz/inspection/candle.ts:118

Creates a stable OHLC-bar inspection ref without reading data or subscribing.

useOhlcBarInspection: <D>(_inputs: Pick<OhlcBarSeriesProps<D>, "data" | "time" | "open" | "high" | "low" | "close">) => OhlcBarInspectionRef<D>

Related API: useOhlcBarInspection, OhlcBarSeriesProps, OhlcBarInspectionRef.

  • _inputs — Inputs retained only to infer the original datum type.

A ref for exactly one OhlcBarSeries inspection prop.

OhlcBarInspectionRef

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:128

Selects captured original OHLC by nearest timestamp, retaining source-order ties.

nearestRecordedOhlcBarX: <D>(rendered: OhlcBarRenderedSeries<D>, options: { time: number; filter?: (observation: OhlcBarInspectionCandidate<D>) => boolean; }) => NearestOhlcBarHit<D> | undefined

Related API: nearestRecordedOhlcBarX, OhlcBarRenderedSeries, OhlcBarInspectionCandidate, NearestOhlcBarHit.

  • rendered — Borrowed committed OHLC generation.

  • options — Timestamp and optional pure candidate filter.

First source-order match on a tie, or undefined when none qualifies.

NearestOhlcBarHit

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:209

Finds the last-painted OHLC segment covering a root-logical point.

paintedOhlcBarAt: <D>(rendered: OhlcBarRenderedSeries<D>, options: { rootPoint: Readonly<RenderedSeriesPoint>; }) => PaintedOhlcBarHit<D> | undefined

Related API: paintedOhlcBarAt, OhlcBarRenderedSeries, RenderedSeriesPoint, PaintedOhlcBarHit.

  • rendered — Borrowed committed OHLC generation.

  • options — Root-logical point; clips and singular transforms produce no result.

Captured OHLC record and painted segment, or undefined for gaps.

PaintedOhlcBarHit

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:266

One original OHLC record and its values and geometry as evaluated during paint.

interface OhlcBarObservation<D>

Related API: OhlcBarObservation.

OhlcBarRenderedSeries

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:17

datum
readonly datum: D

Caller-owned original record.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:19

sourceIndex
readonly sourceIndex: number

Original source index, including skipped rows.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:21

time
readonly time: number

Evaluated UTC-millisecond timestamp.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:23

open
readonly open: number

Evaluated opening value.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:25

high
readonly high: number

Evaluated high value.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:27

low
readonly low: number

Evaluated low value.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:29

close
readonly close: number

Evaluated closing value.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:31

anchorLocal
readonly anchorLocal: Readonly<RenderedSeriesPoint>

Related API: RenderedSeriesPoint.

Closing endpoint in series-local coordinates.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:32

anchorRoot
readonly anchorRoot: Readonly<RenderedSeriesPoint>

Related API: RenderedSeriesPoint.

Closing endpoint in root-logical coordinates.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:33

stemLocal
readonly stemLocal: Readonly<{ x: number; highY: number; lowY: number; }>

High/low segment before world transforms.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:34

openTickLocal
readonly openTickLocal: Readonly<{ x1: number; x2: number; y: number; }>

Left-facing opening segment before world transforms.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:39

closeTickLocal
readonly closeTickLocal: Readonly<{ x1: number; x2: number; y: number; }>

Right-facing closing segment before world transforms.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:44

A nearest-time OHLC candidate with committed clip eligibility.

interface OhlcBarInspectionCandidate<D> extends OhlcBarObservation<D>

Related API: OhlcBarInspectionCandidate, OhlcBarObservation.

nearestRecordedOhlcBarX

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:53

anchorInsideClips
anchorInsideClips: () => boolean

Related API: anchorInsideClips.

Whether the close anchor lies inside every committed clip.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:55

datum
readonly datum: D

Caller-owned original record.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:19

sourceIndex
readonly sourceIndex: number

Original source index, including skipped rows.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:21

time
readonly time: number

Evaluated UTC-millisecond timestamp.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:23

open
readonly open: number

Evaluated opening value.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:25

high
readonly high: number

Evaluated high value.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:27

low
readonly low: number

Evaluated low value.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:29

close
readonly close: number

Evaluated closing value.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:31

anchorLocal
readonly anchorLocal: Readonly<RenderedSeriesPoint>

Related API: RenderedSeriesPoint.

Closing endpoint in series-local coordinates.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:32

anchorRoot
readonly anchorRoot: Readonly<RenderedSeriesPoint>

Related API: RenderedSeriesPoint.

Closing endpoint in root-logical coordinates.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:33

stemLocal
readonly stemLocal: Readonly<{ x: number; highY: number; lowY: number; }>

High/low segment before world transforms.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:34

openTickLocal
readonly openTickLocal: Readonly<{ x1: number; x2: number; y: number; }>

Left-facing opening segment before world transforms.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:39

closeTickLocal
readonly closeTickLocal: Readonly<{ x1: number; x2: number; y: number; }>

Right-facing closing segment before world transforms.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:44

Original OHLC selected by nearest timestamp.

interface NearestOhlcBarHit<D> extends OhlcBarObservation<D>

Related API: NearestOhlcBarHit, OhlcBarObservation.

nearestRecordedOhlcBarX

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:60

timeDelta
readonly timeDelta: number

Absolute UTC-millisecond distance from the requested timestamp.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:62

datum
readonly datum: D

Caller-owned original record.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:19

sourceIndex
readonly sourceIndex: number

Original source index, including skipped rows.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:21

time
readonly time: number

Evaluated UTC-millisecond timestamp.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:23

open
readonly open: number

Evaluated opening value.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:25

high
readonly high: number

Evaluated high value.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:27

low
readonly low: number

Evaluated low value.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:29

close
readonly close: number

Evaluated closing value.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:31

anchorLocal
readonly anchorLocal: Readonly<RenderedSeriesPoint>

Related API: RenderedSeriesPoint.

Closing endpoint in series-local coordinates.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:32

anchorRoot
readonly anchorRoot: Readonly<RenderedSeriesPoint>

Related API: RenderedSeriesPoint.

Closing endpoint in root-logical coordinates.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:33

stemLocal
readonly stemLocal: Readonly<{ x: number; highY: number; lowY: number; }>

High/low segment before world transforms.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:34

openTickLocal
readonly openTickLocal: Readonly<{ x1: number; x2: number; y: number; }>

Left-facing opening segment before world transforms.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:39

closeTickLocal
readonly closeTickLocal: Readonly<{ x1: number; x2: number; y: number; }>

Right-facing closing segment before world transforms.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:44

An actual painted OHLC stroke segment covering a root-logical point.

interface PaintedOhlcBarHit<D> extends OhlcBarObservation<D>

Related API: PaintedOhlcBarHit, OhlcBarObservation.

paintedOhlcBarAt

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:67

part
readonly part: "closeTick" | "openTick" | "stem"

Last painted matching segment.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:69

datum
readonly datum: D

Caller-owned original record.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:19

sourceIndex
readonly sourceIndex: number

Original source index, including skipped rows.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:21

time
readonly time: number

Evaluated UTC-millisecond timestamp.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:23

open
readonly open: number

Evaluated opening value.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:25

high
readonly high: number

Evaluated high value.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:27

low
readonly low: number

Evaluated low value.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:29

close
readonly close: number

Evaluated closing value.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:31

anchorLocal
readonly anchorLocal: Readonly<RenderedSeriesPoint>

Related API: RenderedSeriesPoint.

Closing endpoint in series-local coordinates.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:32

anchorRoot
readonly anchorRoot: Readonly<RenderedSeriesPoint>

Related API: RenderedSeriesPoint.

Closing endpoint in root-logical coordinates.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:33

stemLocal
readonly stemLocal: Readonly<{ x: number; highY: number; lowY: number; }>

High/low segment before world transforms.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:34

openTickLocal
readonly openTickLocal: Readonly<{ x1: number; x2: number; y: number; }>

Left-facing opening segment before world transforms.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:39

closeTickLocal
readonly closeTickLocal: Readonly<{ x1: number; x2: number; y: number; }>

Right-facing closing segment before world transforms.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:44

Mount-owned optional OHLC bar receiver.

interface OhlcBarInspectionRef<D>

Related API: OhlcBarInspectionRef.

useOhlcBarInspection

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:108

rendered
rendered: () => OhlcBarRenderedSeries<D> | undefined

Related API: OhlcBarRenderedSeries.

Current borrowed generation, or undefined before paint and after disposal.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:110

capture
capture: (input: { marks: readonly CapturedOhlcBarMark<D>[]; xScale: NumericPositionScale; yScale: ResolvedContinuousScale; }) => void

Related API: ResolvedContinuousScale.

  • input — Captured marks and committed mappings.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:113

Borrowed committed OHLC generation.

interface OhlcBarRenderedSeries<D>

Related API: OhlcBarRenderedSeries.

OhlcBarInspectionRef

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:81

observations
readonly observations: readonly OhlcBarObservation<D>[]

Related API: OhlcBarObservation.

Captured original observations in source order.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:83

assertLive
assertLive: () => void

Throws after replacement or disposal.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:85

timeAtRoot
timeAtRoot: (pointRoot: Readonly<RenderedSeriesPoint>) => number | undefined

Related API: RenderedSeriesPoint.

Inverts a root-logical point to a timestamp.

  • pointRoot — Root-logical point.

Timestamp, or undefined for a singular transform.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:90

anchorInsideClips
anchorInsideClips: (pointLocal: Readonly<RenderedSeriesPoint>) => boolean

Related API: anchorInsideClips, RenderedSeriesPoint.

Tests a local point against every committed clip.

  • pointLocal — Series-local point.

Whether every committed clip contains it.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:95

marks
readonly marks: readonly CapturedOhlcBarMark<D>[]

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:96

numeric
readonly numeric: NumericRenderedSeries<D>

Related API: NumericRenderedSeries.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:97

localAtRoot
localAtRoot: (point: Readonly<RenderedSeriesPoint>) => Readonly<RenderedSeriesPoint> | undefined

Related API: RenderedSeriesPoint.

  • point — Root-logical coordinate.

Local coordinate, or undefined for a singular transform.

View source — packages/core/src/features/viz/inspection/ohlc-bar.ts:101

Finds the ascending low/high extent of complete OHLC rows whose mapped center is visible. See CandlestickSeries.

The supplied position function keeps elapsed-time and fractional trading-slot visibility explicit. It does not sort or mutate data, interpolate timestamps, or use painted pixels.

visibleOhlcPriceExtent: <D>(data: readonly D[], options: VisibleOhlcPriceExtentOptions<D>) => LinearDomain | undefined

Related API: visibleOhlcPriceExtent, VisibleOhlcPriceExtentOptions, LinearDomain.

  • data — Original OHLC records in application-owned source order.

  • options — Named accessors and one caller-defined visibility coordinate system.

Frozen ascending low/high endpoints, or undefined when no complete visible candle exists.

CandlestickSeries

View source — packages/core/src/features/viz/lib/financial-autoscale.ts:62

Expands a finite numeric domain by equal proportional padding on both sides. See LinearScale.

Flat domains first receive minimumSpan or max(abs(value) * 0.02, 1), then padding. Input direction is preserved and output endpoints are frozen.

padLinearDomain: (domain: LinearDomain, options?: PadLinearDomainOptions) => LinearDomain

Related API: padLinearDomain, LinearDomain, PadLinearDomainOptions.

  • domain — Two finite numeric endpoints, including equal values.

  • options — Padding fraction and optional positive effective-span floor.

A distinct finite padded domain in the input direction.

LinearScale

View source — packages/core/src/features/viz/lib/financial-autoscale.ts:111

Inputs that identify complete OHLC candle values. See visibleOhlcPriceExtent.

interface VisibleOhlcPriceExtentOptions<D>

Related API: VisibleOhlcPriceExtentOptions.

View source — packages/core/src/features/viz/lib/financial-autoscale.ts:7

time
readonly time: LineAccessor<D>

Related API: LineAccessor.

UTC-millisecond property or callback.

View source — packages/core/src/features/viz/lib/financial-autoscale.ts:9

open
readonly open: LineAccessor<D>

Related API: LineAccessor.

Opening-price property or callback.

View source — packages/core/src/features/viz/lib/financial-autoscale.ts:11

high
readonly high: LineAccessor<D>

Related API: LineAccessor.

High-price property or callback.

View source — packages/core/src/features/viz/lib/financial-autoscale.ts:13

low
readonly low: LineAccessor<D>

Related API: LineAccessor.

Low-price property or callback.

View source — packages/core/src/features/viz/lib/financial-autoscale.ts:15

close
readonly close: LineAccessor<D>

Related API: LineAccessor.

Closing-price property or callback.

View source — packages/core/src/features/viz/lib/financial-autoscale.ts:17

positionAtTime
readonly positionAtTime: (time: number) => number | undefined

Maps an exact timestamp into the coordinate system used by visibleRange.

  • time — Finite UTC-millisecond timestamp from the current source row.

A finite position, or undefined to exclude the row.

ResolvedTradingTimeScale

View source — packages/core/src/features/viz/lib/financial-autoscale.ts:24

visibleRange
readonly visibleRange: LinearDomain

Related API: LinearDomain.

Two finite endpoints in the positionAtTime coordinate system; either order is accepted.

View source — packages/core/src/features/viz/lib/financial-autoscale.ts:26

defined (optional)
readonly defined?: ((datum: D, index: number, data: readonly D[]) => boolean) | undefined

Excludes an original row before any accessor runs.

  • datum — Original source row.

  • index — Source index.

  • data — Complete original source array.

Whether this row participates.

View source — packages/core/src/features/viz/lib/financial-autoscale.ts:34

Options for expanding a continuous numeric domain. See padLinearDomain.

interface PadLinearDomainOptions

Related API: PadLinearDomainOptions.

View source — packages/core/src/features/viz/lib/financial-autoscale.ts:38

padding (optional)
readonly padding?: number | undefined

Fraction of the effective span added to each side; defaults to 0.1.

View source — packages/core/src/features/viz/lib/financial-autoscale.ts:40

minimumSpan (optional)
readonly minimumSpan?: number | undefined

Positive span floor before padding. Flat domains use a deterministic fallback when omitted.

View source — packages/core/src/features/viz/lib/financial-autoscale.ts:42

Derives source-ordered cumulative simple percentage returns from one exact positive base.

Each defined finite observation becomes (value / baseValue - 1) * 100, expressed in percentage points. This is a fixed-base return series, not a period-over-period return. Missing/nonfinite values become explicit gaps; a missing exact base returns undefined.

percentageReturns: <D>(data: readonly D[], options: ComparisonBaseOptions<D>) => readonly PercentageReturnPoint<D>[] | undefined

Related API: percentageReturns, ComparisonBaseOptions, PercentageReturnPoint.

  • data — Caller-owned source observations in presentation order.

  • options — Time/value accessors, exact common base, and optional eligibility predicate.

Frozen points, or undefined when no eligible complete exact base exists.

ComparisonBaseOptions

View source — packages/core/src/features/viz/lib/financial-comparison.ts:149

Derives source-ordered values indexed to 100 at one exact positive base observation.

Missing/nonfinite values become explicit gaps; a missing exact base returns undefined.

indexTo100: <D>(data: readonly D[], options: ComparisonBaseOptions<D>) => readonly IndexedValuePoint<D>[] | undefined

Related API: indexTo100, ComparisonBaseOptions, IndexedValuePoint.

  • data — Caller-owned source observations in presentation order.

  • options — Time/value accessors, exact common base, and optional eligibility predicate.

Frozen points, or undefined when no eligible complete exact base exists.

ComparisonBaseOptions

View source — packages/core/src/features/viz/lib/financial-comparison.ts:175

Inputs for a fixed-base financial comparison. See percentageReturns.

interface ComparisonBaseOptions<D>

Related API: ComparisonBaseOptions.

View source — packages/core/src/features/viz/lib/financial-comparison.ts:5

time
readonly time: LineAccessor<D>

Related API: LineAccessor.

UTC-millisecond property or callback that identifies the common base observation.

View source — packages/core/src/features/viz/lib/financial-comparison.ts:7

value
readonly value: LineAccessor<D>

Related API: LineAccessor.

Numeric property or callback that supplies each instrument’s observed value.

View source — packages/core/src/features/viz/lib/financial-comparison.ts:9

baseTime
readonly baseTime: number

Safe UTC-millisecond timestamp that must match exactly one eligible complete observation.

View source — packages/core/src/features/viz/lib/financial-comparison.ts:11

defined (optional)
readonly defined?: ((datum: D, index: number, data: readonly D[]) => boolean) | undefined

Excludes a row before either accessor runs and produces a derived gap.

  • datum — Original source observation.

  • index — Original source index.

  • data — Complete original source array.

Whether this observation is eligible for the base and derived points.

View source — packages/core/src/features/viz/lib/financial-comparison.ts:19

One source-ordered cumulative simple-return observation. See percentageReturns.

interface PercentageReturnPoint<D>

Related API: PercentageReturnPoint.

View source — packages/core/src/features/viz/lib/financial-comparison.ts:23

datum
readonly datum: D

Caller-owned original observation.

View source — packages/core/src/features/viz/lib/financial-comparison.ts:25

sourceIndex
readonly sourceIndex: number

Original index, including rows that become gaps.

View source — packages/core/src/features/viz/lib/financial-comparison.ts:27

time
readonly time: number | null

Evaluated finite timestamp, or null for a missing, invalid, or excluded row.

View source — packages/core/src/features/viz/lib/financial-comparison.ts:29

returnPercent
readonly returnPercent: number | null

Percentage change from the common base, or null for a gap.

View source — packages/core/src/features/viz/lib/financial-comparison.ts:31

One source-ordered base-100 indexed observation. See indexTo100.

interface IndexedValuePoint<D>

Related API: IndexedValuePoint.

View source — packages/core/src/features/viz/lib/financial-comparison.ts:35

datum
readonly datum: D

Caller-owned original observation.

View source — packages/core/src/features/viz/lib/financial-comparison.ts:37

sourceIndex
readonly sourceIndex: number

Original index, including rows that become gaps.

View source — packages/core/src/features/viz/lib/financial-comparison.ts:39

time
readonly time: number | null

Evaluated finite timestamp, or null for a missing, invalid, or excluded row.

View source — packages/core/src/features/viz/lib/financial-comparison.ts:41

indexValue
readonly indexValue: number | null

Value indexed to 100 at the common base, or null for a gap.

View source — packages/core/src/features/viz/lib/financial-comparison.ts:43

Aggregates source-ordered complete OHLCV records into caller-defined chronological buckets.

It never sorts or mutates source records. Missing, excluded, and null-bucket records are skipped; finite malformed candles, negative volume, noncontiguous bucket bounds, and time disorder reject.

aggregateOhlcv: <D>(data: readonly D[], options: AggregateOhlcvOptions<D>) => readonly AggregatedOhlcvPoint<D>[]

Related API: aggregateOhlcv, AggregateOhlcvOptions, AggregatedOhlcvPoint.

  • data — Caller-owned source observations in chronological order.

  • options — OHLCV accessors, bucket definition, and optional participation callback.

Frozen anchored aggregate bars with frozen original source references.

AggregateOhlcvOptions

AggregatedOhlcvPoint

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:167

Derives source-aligned volume-weighted prices that reset whenever the session identifier changes.

Missing prices or volumes and excluded rows produce null without changing the current accumulated state. Zero-volume complete records preserve the preceding VWAP; negative volumes reject.

sessionVwap: <D>(data: readonly D[], options: SessionVwapOptions<D>) => readonly SessionVwapPoint<D>[]

Related API: sessionVwap, SessionVwapOptions, SessionVwapPoint.

  • data — Caller-owned source observations in presentation order.

  • options — Price, volume, session accessors, and optional participation callback.

Frozen source-aligned points with current cumulative volume and VWAP or null.

SessionVwapOptions

SessionVwapPoint

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:222

One half-open time interval used to group complete OHLCV records. See AggregateOhlcvOptions.

interface OhlcvBucket

Related API: OhlcvBucket.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:5

start
readonly start: number

Inclusive finite start coordinate.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:7

end
readonly end: number

Exclusive finite end coordinate after the start.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:9

Original source record that contributed to an aggregated OHLCV bar. See AggregatedOhlcvPoint.

interface OhlcvSource<D>

Related API: OhlcvSource.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:13

datum
readonly datum: D

Caller-owned complete contributing record.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:15

sourceIndex
readonly sourceIndex: number

Original source index.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:17

One frozen OHLCV bar aggregated without sorting caller-owned records. See aggregateOhlcv.

interface AggregatedOhlcvPoint<D> extends OhlcvBucket

Related API: AggregatedOhlcvPoint, OhlcvBucket.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:21

open
readonly open: number

Open from the first contributing record.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:23

high
readonly high: number

Maximum high from contributing records.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:25

low
readonly low: number

Minimum low from contributing records.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:27

close
readonly close: number

Close from the last contributing record.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:29

volume
readonly volume: number

Finite sum of non-negative contributing volumes.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:31

sources
readonly sources: readonly OhlcvSource<D>[]

Related API: OhlcvSource.

Frozen references to contributing caller-owned records.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:33

start
readonly start: number

Inclusive finite start coordinate.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:7

end
readonly end: number

Exclusive finite end coordinate after the start.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:9

Inputs for chronological OHLCV aggregation. See aggregateOhlcv.

interface AggregateOhlcvOptions<D>

Related API: AggregateOhlcvOptions.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:37

time
readonly time: LineAccessor<D>

Related API: LineAccessor.

Numeric property or callback that supplies each record’s time coordinate.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:39

open
readonly open: LineAccessor<D>

Related API: LineAccessor.

Numeric property or callback that supplies open.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:41

high
readonly high: LineAccessor<D>

Related API: LineAccessor.

Numeric property or callback that supplies high.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:43

low
readonly low: LineAccessor<D>

Related API: LineAccessor.

Numeric property or callback that supplies low.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:45

close
readonly close: LineAccessor<D>

Related API: LineAccessor.

Numeric property or callback that supplies close.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:47

volume
readonly volume: LineAccessor<D>

Related API: LineAccessor.

Numeric property or callback that supplies non-negative volume.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:49

bucket
readonly bucket: (time: number) => OhlcvBucket | null

Related API: OhlcvBucket.

Returns the half-open aggregate bucket for one eligible finite timestamp, or null to skip it.

  • time — Eligible finite source timestamp.

A containing half-open bucket, or null when the record is not aggregated.

OhlcvBucket

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:56

defined (optional)
readonly defined?: ((datum: D, index: number, data: readonly D[]) => boolean) | undefined

Excludes a record before its OHLCV and bucket accessors run.

  • datum — Original source observation.

  • index — Zero-based source index.

  • data — Complete caller-supplied source array.

Whether this observation may contribute.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:64

A valid session identifier supplied to sessionVwap.

type SessionIdentifier = string | number

Related API: SessionIdentifier.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:68

A property or callback that supplies the session containing a source record.

type SessionAccessor<D> = | { [K in keyof D]-?: D[K] extends SessionIdentifier ? K : never }[keyof D]
| ((datum: D, index: number, data: readonly D[]) => SessionIdentifier)

Related API: SessionAccessor, SessionIdentifier.

  • datum — Source observation under consideration.

  • index — Zero-based source index.

  • data — Complete caller-supplied source array.

The record’s string or finite numeric session identifier.

SessionVwapOptions

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:78

Inputs for source-aligned session VWAP. See sessionVwap.

interface SessionVwapOptions<D>

Related API: SessionVwapOptions.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:83

price
readonly price: LineAccessor<D>

Related API: LineAccessor.

Numeric property or callback that supplies each record’s price.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:85

volume
readonly volume: LineAccessor<D>

Related API: LineAccessor.

Numeric property or callback that supplies non-negative volume.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:87

session
readonly session: SessionAccessor<D>

Related API: SessionAccessor.

Property or callback that supplies the current string or finite numeric session identifier.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:89

defined (optional)
readonly defined?: ((datum: D, index: number, data: readonly D[]) => boolean) | undefined

Excludes a row before price and volume accessors run; its session still resets state.

  • datum — Original source observation.

  • index — Zero-based source index.

  • data — Complete caller-supplied source array.

Whether this observation participates in VWAP calculation.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:97

One frozen source-aligned session VWAP point. See sessionVwap.

interface SessionVwapPoint<D>

Related API: SessionVwapPoint.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:101

datum
readonly datum: D

Caller-owned original record.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:103

sourceIndex
readonly sourceIndex: number

Original source index, including excluded and incomplete records.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:105

session
readonly session: SessionIdentifier

Related API: SessionIdentifier.

Evaluated session, including for an excluded source record.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:107

cumulativeVolume
readonly cumulativeVolume: number

Finite volume accumulated for this session before or including this record.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:109

vwap
readonly vwap: number | null

Session VWAP after this valid record, null for incomplete or excluded records.

View source — packages/core/src/features/viz/lib/financial-aggregation.ts:111

Derives a source-aligned simple moving average from consecutive finite observations.

Missing, nonfinite, and excluded observations produce null and reset warmup. Results are population-neutral arithmetic means; no timestamps are inferred or changed.

simpleMovingAverage: <D>(data: readonly D[], options: MovingAverageOptions<D>) => readonly MovingAveragePoint<D>[]

Related API: simpleMovingAverage, MovingAverageOptions, MovingAveragePoint.

  • data — Source observations, retained in their original order.

  • options — Value accessor, consecutive period, and optional participation callback.

Frozen source-aligned average observations, with null during warmup and gaps.

MovingAverageOptions

MovingAveragePoint

View source — packages/core/src/features/viz/lib/financial-indicators.ts:154

Derives a source-aligned exponential moving average seeded by the first complete SMA window.

Its smoothing factor is 2 / (period + 1). Missing, nonfinite, and excluded observations produce null and reset the seed window.

exponentialMovingAverage: <D>(data: readonly D[], options: MovingAverageOptions<D>) => readonly MovingAveragePoint<D>[]

Related API: exponentialMovingAverage, MovingAverageOptions, MovingAveragePoint.

  • data — Source observations, retained in their original order.

  • options — Value accessor, consecutive seed period, and optional participation callback.

Frozen source-aligned average observations, with null during warmup and gaps.

MovingAverageOptions

MovingAveragePoint

View source — packages/core/src/features/viz/lib/financial-indicators.ts:188

Derives source-aligned Bollinger bands from trailing consecutive population-standard-deviation windows.

Missing, nonfinite, and excluded observations produce null bands and reset warmup. The multiplier defaults to 2; caller-owned data are neither sorted nor mutated.

bollingerBands: <D>(data: readonly D[], options: BollingerBandsOptions<D>) => readonly BollingerBandPoint<D>[]

Related API: bollingerBands, BollingerBandsOptions, BollingerBandPoint.

  • data — Source observations, retained in their original order.

  • options — Value accessor, period, participation callback, and optional band multiplier.

Frozen source-aligned population-standard-deviation band observations.

BollingerBandsOptions

BollingerBandPoint

View source — packages/core/src/features/viz/lib/financial-indicators.ts:227

Inputs shared by source-aligned moving-average indicators.

interface MovingAverageOptions<D>

Related API: MovingAverageOptions.

MovingAveragePoint

LineAccessor

View source — packages/core/src/features/viz/lib/financial-indicators.ts:10

value
readonly value: LineAccessor<D>

Related API: LineAccessor.

Numeric property or callback that supplies each observation.

LineAccessor

View source — packages/core/src/features/viz/lib/financial-indicators.ts:16

period
readonly period: number

Required number of consecutive complete observations in each window.

MovingAveragePoint

View source — packages/core/src/features/viz/lib/financial-indicators.ts:22

defined (optional)
readonly defined?: ((datum: D, index: number, data: readonly D[]) => boolean) | undefined

Excludes a row before its value accessor runs and resets the current window.

  • datum — Source observation under consideration.

  • index — Zero-based source index.

  • data — Complete caller-supplied source data.

Whether the observation participates in the current consecutive window.

LineAccessor

View source — packages/core/src/features/viz/lib/financial-indicators.ts:32

Inputs for source-aligned population-standard-deviation Bollinger bands.

interface BollingerBandsOptions<D> extends MovingAverageOptions<D>

Related API: BollingerBandsOptions, MovingAverageOptions.

MovingAverageOptions

BollingerBandPoint

View source — packages/core/src/features/viz/lib/financial-indicators.ts:41

multiplier (optional)
readonly multiplier?: number | undefined

Number of population standard deviations from the mean; defaults to 2.

BollingerBandPoint

View source — packages/core/src/features/viz/lib/financial-indicators.ts:47

value
readonly value: LineAccessor<D>

Related API: LineAccessor.

Numeric property or callback that supplies each observation.

LineAccessor

View source — packages/core/src/features/viz/lib/financial-indicators.ts:16

period
readonly period: number

Required number of consecutive complete observations in each window.

MovingAveragePoint

View source — packages/core/src/features/viz/lib/financial-indicators.ts:22

defined (optional)
readonly defined?: ((datum: D, index: number, data: readonly D[]) => boolean) | undefined

Excludes a row before its value accessor runs and resets the current window.

  • datum — Source observation under consideration.

  • index — Zero-based source index.

  • data — Complete caller-supplied source data.

Whether the observation participates in the current consecutive window.

LineAccessor

View source — packages/core/src/features/viz/lib/financial-indicators.ts:32

One source-aligned simple or exponential moving-average observation.

interface MovingAveragePoint<D>

Related API: MovingAveragePoint.

MovingAverageOptions

View source — packages/core/src/features/viz/lib/financial-indicators.ts:55

datum
readonly datum: D

Caller-owned original observation.

View source — packages/core/src/features/viz/lib/financial-indicators.ts:57

sourceIndex
readonly sourceIndex: number

Original source index, including rows that become gaps.

View source — packages/core/src/features/viz/lib/financial-indicators.ts:59

average
readonly average: number | null

Average after a complete consecutive window, or null during warmup/a gap.

View source — packages/core/src/features/viz/lib/financial-indicators.ts:61

One source-aligned population-standard-deviation Bollinger-band observation.

interface BollingerBandPoint<D>

Related API: BollingerBandPoint.

BollingerBandsOptions

View source — packages/core/src/features/viz/lib/financial-indicators.ts:69

datum
readonly datum: D

Caller-owned original observation.

View source — packages/core/src/features/viz/lib/financial-indicators.ts:71

sourceIndex
readonly sourceIndex: number

Original source index, including rows that become gaps.

View source — packages/core/src/features/viz/lib/financial-indicators.ts:73

mean
readonly mean: number | null

Window mean, or null during warmup/a gap.

View source — packages/core/src/features/viz/lib/financial-indicators.ts:75

lower
readonly lower: number | null

Mean minus multiplier population standard deviations, or null during warmup/a gap.

View source — packages/core/src/features/viz/lib/financial-indicators.ts:77

upper
readonly upper: number | null

Mean plus multiplier population standard deviations, or null during warmup/a gap.

View source — packages/core/src/features/viz/lib/financial-indicators.ts:79

Derives source-aligned Wilder relative strength index observations.

The first RSI follows a full period of consecutive price changes, requiring period + 1 consecutive prices. Flat average gain/loss yields 50; gain-only yields 100 and loss-only yields 0. Missing, nonfinite, and excluded rows produce null and reset the seed.

relativeStrengthIndex: <D>(data: readonly D[], options: RelativeStrengthIndexOptions<D>) => readonly RelativeStrengthIndexPoint<D>[]

Related API: relativeStrengthIndex, RelativeStrengthIndexOptions, RelativeStrengthIndexPoint.

  • data — Source observations, retained in their original order.

  • options — Closing value accessor, Wilder period, and optional participation callback.

Frozen source-aligned RSI observations.

RelativeStrengthIndexOptions

RelativeStrengthIndexPoint

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:202

Derives source-aligned MACD, signal, and histogram observations from SMA-seeded EMAs.

Missing, nonfinite, and excluded rows produce null fields and reset all EMA warmup. The MACD value appears once both price EMAs are seeded; signal and histogram wait for their own EMA seed.

movingAverageConvergenceDivergence: <D>(data: readonly D[], options: MovingAverageConvergenceDivergenceOptions<D>) => readonly MovingAverageConvergenceDivergencePoint<D>[]

Related API: movingAverageConvergenceDivergence, MovingAverageConvergenceDivergenceOptions, MovingAverageConvergenceDivergencePoint.

  • data — Source observations, retained in their original order.

  • options — Closing value accessor, ordered EMA periods, and participation callback.

Frozen source-aligned MACD observations.

MovingAverageConvergenceDivergenceOptions

MovingAverageConvergenceDivergencePoint

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:271

Derives source-aligned rolling stochastic %K, smoothed %K, and %D observations.

%K uses the trailing high/low range. A zero range yields null raw %K and resets only the %K/%D smoothing warmup, while its complete OHLC row remains in the rolling range. Missing, nonfinite, and excluded rows reset every window; malformed finite candles reject.

stochasticOscillator: <D>(data: readonly D[], options: StochasticOscillatorOptions<D>) => readonly StochasticOscillatorPoint<D>[]

Related API: stochasticOscillator, StochasticOscillatorOptions, StochasticOscillatorPoint.

  • data — Source OHLC observations, retained in their original order.

  • options — OHLC accessors, rolling periods, and optional participation callback.

Frozen source-aligned stochastic oscillator observations.

StochasticOscillatorOptions

StochasticOscillatorPoint

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:406

Shared inputs for source-aligned closing-price oscillators.

interface OscillatorOptions<D>

Related API: OscillatorOptions.

RelativeStrengthIndexPoint

MovingAverageConvergenceDivergencePoint

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:10

value
readonly value: LineAccessor<D>

Related API: LineAccessor.

Numeric property or callback that supplies each closing observation.

LineAccessor

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:16

defined (optional)
readonly defined?: ((datum: D, index: number, data: readonly D[]) => boolean) | undefined

Excludes a row before its accessor runs and resets the current warmup.

  • datum — Source observation under consideration.

  • index — Zero-based source index.

  • data — Complete caller-supplied source data.

Whether the observation participates in the consecutive calculation.

LineAccessor

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:26

Inputs for Wilder’s relative strength index.

interface RelativeStrengthIndexOptions<D> extends OscillatorOptions<D>

Related API: RelativeStrengthIndexOptions, OscillatorOptions.

OscillatorOptions

RelativeStrengthIndexPoint

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:35

period
readonly period: number

Positive safe number of consecutive price changes used by Wilder smoothing.

relativeStrengthIndex

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:41

value
readonly value: LineAccessor<D>

Related API: LineAccessor.

Numeric property or callback that supplies each closing observation.

LineAccessor

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:16

defined (optional)
readonly defined?: ((datum: D, index: number, data: readonly D[]) => boolean) | undefined

Excludes a row before its accessor runs and resets the current warmup.

  • datum — Source observation under consideration.

  • index — Zero-based source index.

  • data — Complete caller-supplied source data.

Whether the observation participates in the consecutive calculation.

LineAccessor

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:26

Inputs for moving average convergence/divergence.

interface MovingAverageConvergenceDivergenceOptions<D> extends OscillatorOptions<D>

Related API: MovingAverageConvergenceDivergenceOptions, OscillatorOptions.

OscillatorOptions

MovingAverageConvergenceDivergencePoint

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:50

fastPeriod
readonly fastPeriod: number

Positive safe EMA period shorter than slowPeriod.

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:54

slowPeriod
readonly slowPeriod: number

Positive safe EMA period longer than fastPeriod.

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:56

signalPeriod
readonly signalPeriod: number

Positive safe EMA period used to smooth available MACD observations.

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:58

value
readonly value: LineAccessor<D>

Related API: LineAccessor.

Numeric property or callback that supplies each closing observation.

LineAccessor

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:16

defined (optional)
readonly defined?: ((datum: D, index: number, data: readonly D[]) => boolean) | undefined

Excludes a row before its accessor runs and resets the current warmup.

  • datum — Source observation under consideration.

  • index — Zero-based source index.

  • data — Complete caller-supplied source data.

Whether the observation participates in the consecutive calculation.

LineAccessor

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:26

Inputs for the rolling stochastic oscillator.

interface StochasticOscillatorOptions<D>

Related API: StochasticOscillatorOptions.

StochasticOscillatorPoint

LineAccessor

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:67

high
readonly high: LineAccessor<D>

Related API: LineAccessor.

Numeric property or callback that supplies each high. See LineAccessor.

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:69

low
readonly low: LineAccessor<D>

Related API: LineAccessor.

Numeric property or callback that supplies each low. See LineAccessor.

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:71

close
readonly close: LineAccessor<D>

Related API: LineAccessor.

Numeric property or callback that supplies each close. See LineAccessor.

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:73

lookbackPeriod
readonly lookbackPeriod: number

Positive safe count of consecutive OHLC rows in the raw %K range.

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:75

kPeriod
readonly kPeriod: number

Positive safe count of raw %K values in the smoothed %K average.

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:77

dPeriod
readonly dPeriod: number

Positive safe count of smoothed %K values in the %D average.

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:79

defined (optional)
readonly defined?: ((datum: D, index: number, data: readonly D[]) => boolean) | undefined

Excludes a row before its accessors run and resets all oscillator warmup.

  • datum — Source observation under consideration.

  • index — Zero-based source index.

  • data — Complete caller-supplied source data.

Whether the observation participates in consecutive windows.

LineAccessor

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:89

One source-aligned relative strength index observation.

interface RelativeStrengthIndexPoint<D>

Related API: RelativeStrengthIndexPoint.

RelativeStrengthIndexOptions

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:97

datum
readonly datum: D

Caller-owned original observation.

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:99

sourceIndex
readonly sourceIndex: number

Original source index, including rows that become gaps.

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:101

rsi
readonly rsi: number | null

Wilder RSI from zero through 100, or null during warmup and gaps.

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:103

One source-aligned moving average convergence/divergence observation.

interface MovingAverageConvergenceDivergencePoint<D>

Related API: MovingAverageConvergenceDivergencePoint.

MovingAverageConvergenceDivergenceOptions

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:111

datum
readonly datum: D

Caller-owned original observation.

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:113

sourceIndex
readonly sourceIndex: number

Original source index, including rows that become gaps.

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:115

macd
readonly macd: number | null

Fast EMA minus slow EMA, or null before both are seeded.

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:117

signal
readonly signal: number | null

Related API: signal.

EMA of available MACD values, or null during signal warmup.

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:119

histogram
readonly histogram: number | null

MACD minus its signal, or null before the signal is available.

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:121

One source-aligned stochastic oscillator observation.

interface StochasticOscillatorPoint<D>

Related API: StochasticOscillatorPoint.

StochasticOscillatorOptions

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:129

datum
readonly datum: D

Caller-owned original observation.

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:131

sourceIndex
readonly sourceIndex: number

Original source index, including rows that become gaps.

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:133

rawK
readonly rawK: number | null

Unsmoothed %K from zero through 100, or null during warmup/a zero range.

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:135

k
readonly k: number | null

SMA-smoothed %K, or null during warmup/a zero range.

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:137

d
readonly d: number | null

SMA of smoothed %K, or null during warmup/a zero range.

View source — packages/core/src/features/viz/lib/financial-oscillators.ts:139

Paints source-ordered time-aligned volume columns, batching adjacent equal styles. Zero volume is recorded but has no painted coverage. Finite negative volume rejects.

VolumeSeries: <D>({ data: input, time: timeInput, volume: volumeInput, xScale, yScale, defined, style: styleInput, inspection, pointerEvents, ...events }: VolumeSeriesProps<D>) => PibblNode

Related API: VolumeSeries, VolumeSeriesProps, PibblNode.

  • props — Original records, numeric scales, accessors and optional capture.

Ordinary Pibbl paint/event composition.

VolumeSeriesProps

View source — packages/core/src/features/viz/lib/volume-series.tsx:82

Time-aligned volume columns with an independent numeric y-scale.

interface VolumeSeriesProps<D> extends PibblEventHandlers, PibblEventParticipationOptions

Related API: VolumeSeriesProps, PibblEventHandlers, PibblEventParticipationOptions.

VolumeSeries

View source — packages/core/src/features/viz/lib/volume-series.tsx:44

data
readonly data: SignalValue<readonly D[]>

Related API: SignalValue.

Original records or a signal of records; never sorted or mutated.

View source — packages/core/src/features/viz/lib/volume-series.tsx:47

time
readonly time: LineAccessor<D>

Related API: LineAccessor.

UTC-millisecond property or callback; missing/nonfinite values skip the row.

View source — packages/core/src/features/viz/lib/volume-series.tsx:49

volume
readonly volume: LineAccessor<D>

Related API: LineAccessor.

Nonnegative volume property or callback; missing/nonfinite values skip the row.

View source — packages/core/src/features/viz/lib/volume-series.tsx:51

defined (optional)
readonly defined?: ((datum: D, index: number, data: readonly D[]) => boolean) | undefined

Selects source records before evaluating accessors.

  • datum — Original record.

  • index — Original source index.

  • data — Complete source array.

Whether the row participates.

View source — packages/core/src/features/viz/lib/volume-series.tsx:58

xScale
readonly xScale: ScaleId

Related API: ScaleId.

Numeric time scale identity.

View source — packages/core/src/features/viz/lib/volume-series.tsx:60

yScale
readonly yScale: ScaleId

Related API: ScaleId.

Independent numeric volume scale identity; the baseline is zero.

View source — packages/core/src/features/viz/lib/volume-series.tsx:62

style (optional)
readonly style?: ((datum: D, index: number, data: readonly D[]) => VolumeSeriesStyle) | SignalValue<VolumeSeriesStyle> | undefined

Related API: VolumeSeriesStyle, SignalValue.

Constant presentation or a hook-free per-record resolver.

  • datum — Original record.

  • index — Original source index.

  • data — Complete source array.

Column presentation.

View source — packages/core/src/features/viz/lib/volume-series.tsx:69

inspection (optional)
readonly inspection?: VolumeInspectionRef<D> | undefined

Related API: VolumeInspectionRef.

Optional committed capture; importing the renderer does not import inspection queries.

View source — packages/core/src/features/viz/lib/volume-series.tsx:73

pointerEvents (optional)
readonly pointerEvents?: PibblPointerEvents | undefined

Related API: PibblPointerEvents.

Whether this content participates in pointer targeting. See PibblPointerEvents.

View source — packages/core/src/lib/events/types.ts:126

Local column presentation; color meaning is supplied by the application.

interface VolumeSeriesStyle

Related API: VolumeSeriesStyle.

VolumeSeries

View source — packages/core/src/features/viz/lib/volume-series.tsx:27

width (optional)
readonly width?: number | undefined

Positive column width in local logical units; default 70% spacing capped at 12.

View source — packages/core/src/features/viz/lib/volume-series.tsx:29

fill (optional)
readonly fill?: FillStyle | undefined

Related API: FillStyle.

Interior paint; defaults to teal.

View source — packages/core/src/features/viz/lib/volume-series.tsx:31

stroke (optional)
readonly stroke?: StrokeStyle | undefined

Related API: StrokeStyle.

Optional column outline paint.

View source — packages/core/src/features/viz/lib/volume-series.tsx:33

strokeWidth (optional)
readonly strokeWidth?: number | undefined

Nonnegative outline width in local units; default 1.

View source — packages/core/src/features/viz/lib/volume-series.tsx:35

opacity (optional)
readonly opacity?: number | undefined

Related API: opacity.

Paint opacity from zero through one; default 1.

View source — packages/core/src/features/viz/lib/volume-series.tsx:37

cursor (optional)
readonly cursor?: string | undefined

Cursor when the series owns coordinate targeting.

View source — packages/core/src/features/viz/lib/volume-series.tsx:39

Provides gapless positions for ordered supplied observations, leaving application-owned viewport control explicit.

TradingTimeScale: (props: TradingTimeScaleProps) => PibblNode

Related API: TradingTimeScale, TradingTimeScaleProps, PibblNode.

  • props — Timestamps, optional logical viewport, output range and children.

Descendant composition in the named mapping scope.

TradingTimeScaleProps

View source — packages/core/src/features/viz/lib/trading-time-scale.ts:118

Reads a stable dedicated ancestor trading-time signal.

useTradingTimeScale: (id: ScaleId) => Signal<ResolvedTradingTimeScale>

Related API: useTradingTimeScale, ScaleId, Signal, ResolvedTradingTimeScale.

  • id — Ancestor TradingTimeScale identity.

Readonly mapping with explicit timestamp and logical-slot operations.

TradingTimeScale

View source — packages/core/src/features/viz/lib/trading-time-scale.ts:102

Controlled gapless observation slots; UTCScale retains elapsed-time semantics.

interface TradingTimeScaleProps

Related API: TradingTimeScaleProps.

TradingTimeScale

View source — packages/core/src/features/viz/lib/trading-time-scale.ts:23

id
readonly id: ScaleId

Related API: ScaleId.

Ancestor scale identity.

View source — packages/core/src/features/viz/lib/trading-time-scale.ts:24

timestamps
readonly timestamps: SignalValue<readonly number[]>

Related API: SignalValue.

Strictly increasing, unique UTC-millisecond observations; copied by the mapping.

View source — packages/core/src/features/viz/lib/trading-time-scale.ts:25

logicalRange (optional)
readonly logicalRange?: SignalValue<readonly [number, number]> | undefined

Related API: SignalValue.

Visible logical slot endpoints, possibly fractional/reversed; default covers supplied slots.

View source — packages/core/src/features/viz/lib/trading-time-scale.ts:28

range
readonly range: SignalValue<ScaleRange>

Related API: SignalValue, ScaleRange.

Output in local logical units or the receiving allocation’s width/height.

View source — packages/core/src/features/viz/lib/trading-time-scale.ts:31

reverse (optional)
readonly reverse?: SignalValue<boolean> | undefined

Related API: SignalValue.

Reverses physical output without reordering supplied observations.

View source — packages/core/src/features/viz/lib/trading-time-scale.ts:32

style (optional)
Full type declaration
readonly style?: SignalValue<Readonly<{ left?: SignalValue<number | `${number}%` | undefined>; top?: SignalValue<number | `${number}%` | undefined>; width?: SignalValue<Length | undefined>; height?: SignalValue<Length | undefined>; alignSelf?: SignalValue<"auto" | "center" | "end" | "flex-end" | "flex-start" | "start" | "stretch" | undefined>; justifySelf?: SignalValue<"auto" | "center" | "end" | "start" | "stretch" | undefined>; flexBasis?: SignalValue<Length | undefined>; flexGrow?: SignalValue<number | undefined>; flexShrink?: SignalValue<number | undefined>; gridColumnStart?: SignalValue<number | undefined>; gridColumnSpan?: SignalValue<number | undefined>; gridRowStart?: SignalValue<number | undefined>; gridRowSpan?: SignalValue<number | undefined>; transition?: SignalValue<PibblTransitionBinding | undefined>; custom?: unknown; filter?: SignalValue<PibblFilter | readonly PibblFilter[] | undefined>; }>> | undefined

Related API: SignalValue, Length, PibblTransitionBinding, PibblFilter.

Receiving scale frame allocation and layout participation.

View source — packages/core/src/features/viz/lib/trading-time-scale.ts:33

children (optional)
readonly children?: PibblNode

Related API: PibblNode.

Descendant visualization composition.

View source — packages/core/src/features/viz/lib/trading-time-scale.ts:36

Dedicated exact-time/slot mapping; no interpolated UTC timestamps are fabricated.

interface ResolvedTradingTimeScale

Related API: ResolvedTradingTimeScale.

TradingTimeScale

View source — packages/core/src/features/viz/lib/trading-time-scale.ts:41

type
readonly type: "trading-time"

Describes this resolved mapping.

View source — packages/core/src/features/viz/lib/trading-time-scale.ts:42

timestamps
readonly timestamps: readonly number[]

Owned supplied timestamps in ascending order, also used as the data domain.

View source — packages/core/src/features/viz/lib/trading-time-scale.ts:43

domain
readonly domain: readonly number[]

Owned supplied timestamp domain, not logical slot endpoints.

View source — packages/core/src/features/viz/lib/trading-time-scale.ts:44

logicalRange
readonly logicalRange: readonly [number, number]

Controlled viewport endpoints in logical slot units.

View source — packages/core/src/features/viz/lib/trading-time-scale.ts:45

range
readonly range: readonly [number, number]

Output local-logical endpoints.

View source — packages/core/src/features/viz/lib/trading-time-scale.ts:49

frame
readonly frame: Readonly<{ x: number; y: number; width: number; height: number; }>

Receiving allocation in local logical units.

View source — packages/core/src/features/viz/lib/trading-time-scale.ts:53

map
map: (time: number) => number

Maps an exact supplied UTC timestamp; unknown timestamps throw.

  • time — Supplied UTC milliseconds.

Series-local coordinate.

View source — packages/core/src/features/viz/lib/trading-time-scale.ts:62

mapSlot
mapSlot: (slot: number) => number

Maps a possibly fractional logical slot, including viewport whitespace.

  • slot — Logical observation slot.

Series-local coordinate.

View source — packages/core/src/features/viz/lib/trading-time-scale.ts:66

slotAtTime
slotAtTime: (time: number) => number | undefined

Exact timestamp lookup.

  • time — UTC milliseconds.

Supplied slot index, or undefined.

View source — packages/core/src/features/viz/lib/trading-time-scale.ts:70

timeAtSlot
timeAtSlot: (slot: number) => number | undefined

Exact integer slot lookup.

  • slot — Integer logical observation slot.

Supplied timestamp, or undefined.

View source — packages/core/src/features/viz/lib/trading-time-scale.ts:74

slotAtPosition
slotAtPosition: (position: number) => number

Inverts local geometry to fractional slots.

  • position — Series-local logical coordinate.

Fractional logical slot.

View source — packages/core/src/features/viz/lib/trading-time-scale.ts:78

nearestTimeAtPosition
nearestTimeAtPosition: (position: number) => number | undefined

Selects a supplied timestamp; ties choose earlier, outside positions clamp.

  • position — Series-local logical coordinate.

Supplied UTC milliseconds, or undefined for empty input.

View source — packages/core/src/features/viz/lib/trading-time-scale.ts:82

ticks
ticks: (count?: number) => readonly number[]

Chooses at most count visible supplied observations as date ticks.

  • count — Integer maximum from zero through 100, default five.

Original UTC timestamps in physical axis order.

View source — packages/core/src/features/viz/lib/trading-time-scale.ts:86

formatTick
formatTick: (time: number) => string

Formats supplied or finite valid UTC timestamps without inferring sessions.

  • time — UTC milliseconds in Date range.

ISO UTC timestamp.

View source — packages/core/src/features/viz/lib/trading-time-scale.ts:90

Paints OHLC bodies and wicks, preserving source order and skipping complete missing candles. Finite malformed OHLC rejects; equal open/close paints a one-local-unit doji.

CandlestickSeries: <D>({ data: input, time: timeInput, open: openInput, high: highInput, low: lowInput, close: closeInput, xScale, yScale, defined, style: styleInput, inspection, pointerEvents, ...events }: CandlestickSeriesProps<D>) => PibblNode

Related API: CandlestickSeries, CandlestickSeriesProps, PibblNode.

  • props — Named OHLC accessors, scales, styles and optional inspection.

Ordinary Pibbl composition; disjoint equal styles share paint paths.

CandlestickSeriesProps

View source — packages/core/src/features/viz/lib/candlestick-series.tsx:91

Source-ordered OHLC records with named accessors and optional shared inspection.

interface CandlestickSeriesProps<D> extends PibblEventHandlers, PibblEventParticipationOptions

Related API: CandlestickSeriesProps, PibblEventHandlers, PibblEventParticipationOptions.

CandlestickSeries

View source — packages/core/src/features/viz/lib/candlestick-series.tsx:52

data
readonly data: SignalValue<readonly D[]>

Related API: SignalValue.

Original records/signal; never sorted or mutated.

View source — packages/core/src/features/viz/lib/candlestick-series.tsx:54

time
readonly time: LineAccessor<D>

Related API: LineAccessor.

UTC-millisecond property or callback.

View source — packages/core/src/features/viz/lib/candlestick-series.tsx:57

open
readonly open: LineAccessor<D>

Related API: LineAccessor.

Open price property or callback.

View source — packages/core/src/features/viz/lib/candlestick-series.tsx:58

high
readonly high: LineAccessor<D>

Related API: LineAccessor.

High price property or callback.

View source — packages/core/src/features/viz/lib/candlestick-series.tsx:59

low
readonly low: LineAccessor<D>

Related API: LineAccessor.

Low price property or callback.

View source — packages/core/src/features/viz/lib/candlestick-series.tsx:60

close
readonly close: LineAccessor<D>

Related API: LineAccessor.

Close price property or callback.

View source — packages/core/src/features/viz/lib/candlestick-series.tsx:61

xScale
readonly xScale: ScaleId

Related API: ScaleId.

Numeric/UTC/trading horizontal mapping identity.

View source — packages/core/src/features/viz/lib/candlestick-series.tsx:62

yScale
readonly yScale: ScaleId

Related API: ScaleId.

Independent numeric price mapping identity.

View source — packages/core/src/features/viz/lib/candlestick-series.tsx:63

defined (optional)
readonly defined?: ((datum: D, index: number, data: readonly D[]) => boolean) | undefined

Tests original rows before accessor evaluation.

  • datum — Original row.

  • index — Source index including skipped rows.

  • data — Original complete array.

Whether the candle participates.

View source — packages/core/src/features/viz/lib/candlestick-series.tsx:69

style (optional)
readonly style?: ((datum: D, index: number, data: readonly D[]) => CandlestickSeriesStyle) | SignalValue<CandlestickSeriesStyle> | undefined

Related API: CandlestickSeriesStyle, SignalValue.

Named body/wick appearance or a hook-free datum resolver.

  • datum — Original row.

  • index — Original source index.

  • data — Complete source array.

Plain named candle styles.

View source — packages/core/src/features/viz/lib/candlestick-series.tsx:79

inspection (optional)
readonly inspection?: CandleInspectionRef<D> | undefined

Related API: CandleInspectionRef.

Optional capture on the ordinary inspection foundation; no queries while painting.

View source — packages/core/src/features/viz/lib/candlestick-series.tsx:82

pointerEvents (optional)
readonly pointerEvents?: PibblPointerEvents | undefined

Related API: PibblPointerEvents.

Whether this content participates in pointer targeting. See PibblPointerEvents.

View source — packages/core/src/lib/events/types.ts:126

Accepted named body/wick presentation for OHLC marks.

interface CandlestickSeriesStyle

Related API: CandlestickSeriesStyle.

CandlestickSeries

View source — packages/core/src/features/viz/lib/candlestick-series.tsx:41

bandwidth (optional)
readonly bandwidth?: number | "auto" | undefined

Positive local body width, or automatic 70% spacing capped at 12; singleton fallback 8.

View source — packages/core/src/features/viz/lib/candlestick-series.tsx:42

body (optional)
readonly body?: CandleBodyStyle | undefined

Related API: CandleBodyStyle.

Independent open/close body appearance.

View source — packages/core/src/features/viz/lib/candlestick-series.tsx:44

wick (optional)
readonly wick?: CandleWickStyle | undefined

Related API: CandleWickStyle.

Independent high/low wick appearance.

View source — packages/core/src/features/viz/lib/candlestick-series.tsx:45

opacity (optional)
readonly opacity?: number | undefined

Related API: opacity.

Opacity zero through one; default 1.

View source — packages/core/src/features/viz/lib/candlestick-series.tsx:46

cursor (optional)
readonly cursor?: string | undefined

Cursor while the series owns targeting.

View source — packages/core/src/features/viz/lib/candlestick-series.tsx:47

Open/close body paint, independent from wick paint.

interface CandleBodyStyle

Related API: CandleBodyStyle.

CandlestickSeries

View source — packages/core/src/features/viz/lib/candlestick-series.tsx:26

fill (optional)
readonly fill?: FillStyle | undefined

Related API: FillStyle.

Interior; default teal for close >= open, coral otherwise. Empty string disables fill.

View source — packages/core/src/features/viz/lib/candlestick-series.tsx:27

stroke (optional)
readonly stroke?: StrokeStyle | undefined

Related API: StrokeStyle.

Optional body outline.

View source — packages/core/src/features/viz/lib/candlestick-series.tsx:28

strokeWidth (optional)
readonly strokeWidth?: number | undefined

Nonnegative local outline width; default 1.

View source — packages/core/src/features/viz/lib/candlestick-series.tsx:29

High/low wick paint.

interface CandleWickStyle

Related API: CandleWickStyle.

CandlestickSeries

View source — packages/core/src/features/viz/lib/candlestick-series.tsx:34

stroke (optional)
readonly stroke?: StrokeStyle | undefined

Related API: StrokeStyle.

Wick paint; default dark teal. Empty string disables wick paint.

View source — packages/core/src/features/viz/lib/candlestick-series.tsx:35

strokeWidth (optional)
readonly strokeWidth?: number | undefined

Nonnegative local width; default 1.

View source — packages/core/src/features/viz/lib/candlestick-series.tsx:36

Paints source-ordered OHLC bars with a high/low stem, left open tick, and right close tick.

OhlcBarSeries: <D>({ data: input, time: timeInput, open: openInput, high: highInput, low: lowInput, close: closeInput, xScale, yScale, defined, style: styleInput, inspection, pointerEvents, ...events }: OhlcBarSeriesProps<D>) => PibblNode

Related API: OhlcBarSeries, OhlcBarSeriesProps, PibblNode.

  • props — Original OHLC accessors, scales, styles, events, and optional capture.

Ordinary Pibbl composition; equal disjoint styles share paths.

OhlcBarSeriesProps

View source — packages/core/src/features/viz/lib/ohlc-bar-series.tsx:80

Source-ordered OHLC records rendered as a high/low stem with open/close ticks.

interface OhlcBarSeriesProps<D> extends PibblEventHandlers, PibblEventParticipationOptions

Related API: OhlcBarSeriesProps, PibblEventHandlers, PibblEventParticipationOptions.

OhlcBarSeries

View source — packages/core/src/features/viz/lib/ohlc-bar-series.tsx:38

data
readonly data: SignalValue<readonly D[]>

Related API: SignalValue.

Original records or signal; never sorted or mutated.

View source — packages/core/src/features/viz/lib/ohlc-bar-series.tsx:41

time
readonly time: LineAccessor<D>

Related API: LineAccessor.

UTC-millisecond property or callback.

View source — packages/core/src/features/viz/lib/ohlc-bar-series.tsx:43

open
readonly open: LineAccessor<D>

Related API: LineAccessor.

Opening price property or callback.

View source — packages/core/src/features/viz/lib/ohlc-bar-series.tsx:45

high
readonly high: LineAccessor<D>

Related API: LineAccessor.

High price property or callback.

View source — packages/core/src/features/viz/lib/ohlc-bar-series.tsx:47

low
readonly low: LineAccessor<D>

Related API: LineAccessor.

Low price property or callback.

View source — packages/core/src/features/viz/lib/ohlc-bar-series.tsx:49

close
readonly close: LineAccessor<D>

Related API: LineAccessor.

Closing price property or callback.

View source — packages/core/src/features/viz/lib/ohlc-bar-series.tsx:51

xScale
readonly xScale: ScaleId

Related API: ScaleId.

Numeric, UTC, or trading-time horizontal mapping identity.

View source — packages/core/src/features/viz/lib/ohlc-bar-series.tsx:53

yScale
readonly yScale: ScaleId

Related API: ScaleId.

Continuous price mapping identity.

View source — packages/core/src/features/viz/lib/ohlc-bar-series.tsx:55

defined (optional)
readonly defined?: ((datum: D, index: number, data: readonly D[]) => boolean) | undefined

Tests original rows before accessor evaluation.

  • datum — Original row.

  • index — Source index including skipped rows.

  • data — Complete source array.

Whether the bar participates.

View source — packages/core/src/features/viz/lib/ohlc-bar-series.tsx:62

style (optional)
readonly style?: ((datum: D, index: number, data: readonly D[]) => OhlcBarSeriesStyle) | SignalValue<OhlcBarSeriesStyle> | undefined

Related API: OhlcBarSeriesStyle, SignalValue.

Shared presentation or a hook-free original-row resolver.

  • datum — Original row.

  • index — Source index.

  • data — Complete source array.

Plain OHLC-bar style.

View source — packages/core/src/features/viz/lib/ohlc-bar-series.tsx:69

inspection (optional)
readonly inspection?: OhlcBarInspectionRef<D> | undefined

Related API: OhlcBarInspectionRef.

Optional committed capture; the renderer does not execute inspection queries.

View source — packages/core/src/features/viz/lib/ohlc-bar-series.tsx:72

pointerEvents (optional)
readonly pointerEvents?: PibblPointerEvents | undefined

Related API: PibblPointerEvents.

Whether this content participates in pointer targeting. See PibblPointerEvents.

View source — packages/core/src/lib/events/types.ts:126

Shared stroke presentation for an OHLC bar.

interface OhlcBarSeriesStyle

Related API: OhlcBarSeriesStyle.

OhlcBarSeries

View source — packages/core/src/features/viz/lib/ohlc-bar-series.tsx:26

bandwidth (optional)
readonly bandwidth?: number | "auto" | undefined

Positive total width, or automatic 70% spacing capped at 12; singleton fallback 8.

View source — packages/core/src/features/viz/lib/ohlc-bar-series.tsx:27

stroke (optional)
readonly stroke?: StrokeStyle | undefined

Related API: StrokeStyle.

Stem and tick stroke; defaults to dark teal. Empty string disables painting.

View source — packages/core/src/features/viz/lib/ohlc-bar-series.tsx:29

strokeWidth (optional)
readonly strokeWidth?: number | undefined

Nonnegative local stroke width; default 1.

View source — packages/core/src/features/viz/lib/ohlc-bar-series.tsx:30

opacity (optional)
readonly opacity?: number | undefined

Related API: opacity.

Paint opacity from zero through one; default 1.

View source — packages/core/src/features/viz/lib/ohlc-bar-series.tsx:31

cursor (optional)
readonly cursor?: string | undefined

Cursor while the series owns targeting.

View source — packages/core/src/features/viz/lib/ohlc-bar-series.tsx:32

Draws a linear connected series with independently painted regions above and below a baseline. Equal values belong to the above stroke; zero-area spans never receive a fill. Gaps split runs, and optional inspection captures only original records.

BaselineSeries: <D>({ data: dataInput, x: xInput, y: yInput, xScale: xId, yScale: yId, baseline: baselineInput, defined, inspection, style: styleInput, ...eventProps }: BaselineSeriesProps<D>) => JSX.Element

Related API: BaselineSeries, BaselineSeriesProps, JSX.

  • props — Records, a numeric or trading-time x scale, linear price y scale, baseline, event props, and shared side paint.

Filled and stroked Pibbl paths in source paint order.

LineSeriesProps

View source — packages/core/src/features/viz/lib/baseline-series.tsx:100

A linear connected series split into independently painted regions at baseline crossings. See BaselineSeries.

interface BaselineSeriesProps<D> extends PibblEventHandlers, PibblEventParticipationOptions

Related API: BaselineSeriesProps, PibblEventHandlers, PibblEventParticipationOptions.

View source — packages/core/src/features/viz/lib/baseline-series.tsx:41

data
readonly data: SignalValue<readonly D[]>

Related API: SignalValue.

Application records or a signal of records; source order is retained.

View source — packages/core/src/features/viz/lib/baseline-series.tsx:44

x
readonly x: LineAccessor<D>

Related API: LineAccessor.

Property key or callback extracting horizontal coordinates.

View source — packages/core/src/features/viz/lib/baseline-series.tsx:46

y
readonly y: LineAccessor<D>

Related API: LineAccessor.

Property key or callback extracting vertical coordinates.

View source — packages/core/src/features/viz/lib/baseline-series.tsx:48

xScale
readonly xScale: ScaleId

Related API: ScaleId.

Numeric or trading-time horizontal scale identity.

View source — packages/core/src/features/viz/lib/baseline-series.tsx:50

yScale
readonly yScale: ScaleId

Related API: ScaleId.

Linear vertical scale identity.

View source — packages/core/src/features/viz/lib/baseline-series.tsx:52

baseline
readonly baseline: SignalValue<number>

Related API: SignalValue.

Finite data-space division between the above and below presentations.

View source — packages/core/src/features/viz/lib/baseline-series.tsx:54

defined (optional)
readonly defined?: ((datum: D, index: number, data: readonly D[]) => boolean) | undefined

Excludes a record before its accessors run.

View source — packages/core/src/features/viz/lib/baseline-series.tsx:56

inspection (optional)
readonly inspection?: NumericInspectionRef<D> | undefined

Related API: NumericInspectionRef.

Optional committed original-record capture on the standard numeric inspection foundation.

View source — packages/core/src/features/viz/lib/baseline-series.tsx:58

style (optional)
readonly style?: SignalValue<Readonly<{ readonly above?: SignalValue<BaselineSideStyle | undefined>; readonly below?: SignalValue<BaselineSideStyle | undefined>; readonly fillOpacity?: SignalValue<number | undefined>; readonly strokeWidth?: SignalValue<number | undefined>; readonly cursor?: SignalValue<string | undefined>; }>> | undefined

Related API: SignalValue, BaselineSideStyle.

Shared above/below paint and interaction presentation.

View source — packages/core/src/features/viz/lib/baseline-series.tsx:60

pointerEvents (optional)
readonly pointerEvents?: PibblPointerEvents | undefined

Related API: PibblPointerEvents.

Whether this content participates in pointer targeting. See PibblPointerEvents.

View source — packages/core/src/lib/events/types.ts:126

Shared presentation for a linear baseline series. See BaselineSeries.

interface BaselineSeriesStyle

Related API: BaselineSeriesStyle.

View source — packages/core/src/features/viz/lib/baseline-series.tsx:25

above (optional)
readonly above?: BaselineSideStyle | undefined

Related API: BaselineSideStyle.

Paint for y values greater than or equal to baseline.

View source — packages/core/src/features/viz/lib/baseline-series.tsx:27

below (optional)
readonly below?: BaselineSideStyle | undefined

Related API: BaselineSideStyle.

Paint for y values less than baseline.

View source — packages/core/src/features/viz/lib/baseline-series.tsx:29

fillOpacity (optional)
readonly fillOpacity?: number | undefined

Opacity for both area fills; defaults to 0.2.

View source — packages/core/src/features/viz/lib/baseline-series.tsx:31

strokeWidth (optional)
readonly strokeWidth?: number | undefined

Width for both line strokes; defaults to 2.

View source — packages/core/src/features/viz/lib/baseline-series.tsx:33

cursor (optional)
readonly cursor?: string | undefined

Cursor while a painted series path owns targeting.

View source — packages/core/src/features/viz/lib/baseline-series.tsx:35

Shared paint for one side of a baseline. See BaselineSeries.

interface BaselineSideStyle

Related API: BaselineSideStyle.

View source — packages/core/src/features/viz/lib/baseline-series.tsx:17

fill (optional)
readonly fill?: FillStyle | undefined

Related API: FillStyle.

Area fill for this side of the baseline.

View source — packages/core/src/features/viz/lib/baseline-series.tsx:19

stroke (optional)
readonly stroke?: StrokeStyle | undefined

Related API: StrokeStyle.

Line stroke for this side of the baseline.

View source — packages/core/src/features/viz/lib/baseline-series.tsx:21

Read the Data visualization companion for ownership, adaptation, failure modes, and verification. Agent start provides the version-selection workflow.

Documentation built with @pibbl/core 0.0.2, revision dd39ce2. ALPHA — NOT FOR PRODUCTION USE.