Documentation / @finchart/core / index / HistogramPoint
Interface: HistogramPoint
Defined in: packages/core/src/series/histogram-series.ts:22
A single bar. LineDataPoint passes straight through — tone and color are optional.
Why a point can say something about its own colour: it's the convention that a volume bar wears its candle's up/down colour. Up or down is a fact about the data, not a style, and only whoever produces the point knows that fact. tone states the fact and leaves the colour to the theme (--chart-histogram-up / --chart-histogram-down); color is the older door — an explicit colour that steps outside the theme.
Extends
Properties
color?
optionalcolor?:string
Defined in: packages/core/src/series/histogram-series.ts:32
An explicit colour for this bar. Wins over everything; cannot be themed.
label?
optionallabel?:string
Defined in: packages/core/src/data/types.ts:17
Inherited from
tone?
optionaltone?:"up"|"down"
Defined in: packages/core/src/series/histogram-series.ts:30
Which of the two colour slots this bar wears. What counts as up is the producer's to say — a volume bar follows its candle, an oscillator's bar follows the bar before it. A bar without a tone wears the plain histogram colour.
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/series/histogram-series.ts:23