Documentation / @finchart/core / index / BarSeries
Class: BarSeries
Defined in: packages/core/src/series/bar-series.ts:50
An OHLC bar — the 3-stroke notation for a candle. A vertical line (high to low), a left tick (open), and a right tick (close). Value extent and decimation policy are the same as a candle's — it's just a different notation for the same data.
Implements
Constructors
Constructor
new BarSeries(
overrides?):BarSeries
Defined in: packages/core/src/series/bar-series.ts:57
Parameters
overrides?
Returns
BarSeries
Properties
barBody
readonlybarBody:true=true
Defined in: packages/core/src/series/bar-series.ts:53
Whether each point is drawn as a body one bar slot wide — a candle, a bar, a histogram column. A fit pads the chart by half a bar at each end when any series says so, so the end bodies are drawn whole; a chart of lines alone fits edge to edge.
Implementation of
coordinates
readonlycoordinates:CoordinateAccessor<OHLC> =OHLC_COORDINATES
Defined in: packages/core/src/series/bar-series.ts:55
How to read coordinates from its own point. Omitted means reading x and y directly. It's here for the same reason as decimation — a candle's value is close (OHLC has no y), and only the candle knows that.
Implementation of
decimation
readonlydecimation:Readonly<{pointsPerPixel:1;strategy:Readonly<OhlcAggregation>; }> =OHLC_DECIMATION
Defined in: packages/core/src/series/bar-series.ts:52
Aggregated for the same reason as a candle, with one per pixel as the ceiling.
Implementation of
Methods
draw()
draw(
target,context):void
Defined in: packages/core/src/series/bar-series.ts:73
Parameters
target
context
Returns
void
Implementation of
valueExtent()
valueExtent(
data):Range|null
Defined in: packages/core/src/series/bar-series.ts:59
The range this representation occupies on the y axis. A line is a single point, so min === max, but a candle occupies a low-to-high span — that can't be expressed as a single number, so it returns a Range.
null when there's nothing to measure — returning { min: 0, max: 0 } would let a series whose data hasn't arrived yet drag the value axis down to 0.
Parameters
data
Returns
Range | null