Skip to content

Documentation / @finchart/core / index / OHLC

Interface: OHLC ​

Defined in: packages/core/src/data/types.ts:34

The data layer's contract.

This module knows only "what a point is" and "how to pull numbers out of a point." It doesn't import scales, renderers, or the chart.

Extends ​

Properties ​

close ​

close: number

Defined in: packages/core/src/data/types.ts:38


high ​

high: number

Defined in: packages/core/src/data/types.ts:36


label? ​

optional label?: string

Defined in: packages/core/src/data/types.ts:17

Inherited from ​

BaseDataPoint.label


low ​

low: number

Defined in: packages/core/src/data/types.ts:37


open ​

open: number

Defined in: packages/core/src/data/types.ts:35


volume? ​

optional volume?: number | null

Defined in: packages/core/src/data/types.ts:48

Optional, and — unlike the four prices — null is a gap, not a rejection. A bar without volume is still a bar (a feed's JSON says "volume": null on a halted day and the candle still draws), where a bar without a close is nothing to draw. What is rejected: a string, a NaN, an infinity — the data gate checks volume for finiteness the same way it checks the prices. Consumers of volume (aggregation, the indicators) read a gap through isGap.


x ​

x: number

Defined in: packages/core/src/data/types.ts:16

A number — epoch ms or bar index, either way. Formatting is the axis's job. Why not accept Date or a string: the moment you do, every consumption site owes a conversion, and the workaround (Number(x)) produces a silent NaN. Date data needs one .getTime() at the consumer boundary.

Inherited from ​

BaseDataPoint.x