Documentation / @finchart/core / index / LineDataPoint
Interface: LineDataPoint
Defined in: packages/core/src/data/types.ts:20
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
label?
optionallabel?:string
Defined in: packages/core/src/data/types.ts:17
Inherited from
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
y
y:
number|null
Defined in: packages/core/src/data/types.ts:31
The value. null means "there's no value here" (whitespace).
Needed in two places — an indicator's warmup (the first 19 points of MA(20)), and a bar that exists on only one series. Dropping the point entirely would make the line jump straight across the gap.
No separate type (WhitespaceData) because the array needs to be one type for slicing, sorting, and decimation to work unmodified.