Documentation / @finchart/core / index / CandleSeries
Class: CandleSeries
Defined in: packages/core/src/series/candle-series.ts:54
A data representation that can be swapped out on the same stage (Plot).
The grid, axes, pan/zoom, and layers belong to Plot, so they stay put even when the series changes. A series answers five things — how much of the y axis it occupies, how it draws, and (optionally) how its points are thinned, how their coordinates are read, and what a tooltip says about one of them (describe, the series' alone — no registration overrides it). The two policies are resolved registration first, then the series, then the fallback: a registration's coordinates wins over the series', and plain x/y reads when neither says; a registration's decimation fields win over the series' field by field, and the wiring's policy fills what neither sets.
Implements
Constructors
Constructor
new CandleSeries(
overrides?,draws?):CandleSeries
Defined in: packages/core/src/series/candle-series.ts:79
Parameters
overrides?
CandleSeriesStyleOverrides = {}
draws?
CandleDrawOptions = {}
Returns
CandleSeries
Properties
barBody
readonlybarBody:true=true
Defined in: packages/core/src/series/candle-series.ts:62
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/candle-series.ts:65
A candle's value is close. OHLC has no y, so the default accessor can't read it.
Implementation of
decimation
readonlydecimation:Readonly<{pointsPerPixel:1;strategy:Readonly<OhlcAggregation>; }> =OHLC_DECIMATION
Defined in: packages/core/src/series/candle-series.ts:61
A candle is aggregated, not thinned. One per pixel is the ceiling — thinning would lose that interval's high and low, and drawing two candles into one pixel just means the later one covers the earlier one.
Implementation of
Methods
describe()
describe(
point): readonlySeriesRow[]
Defined in: packages/core/src/series/candle-series.ts:68
O/H/L/C, and V when the bar carries a volume — a gap (null or absent) is left out, not shown as a dash.
Parameters
point
Returns
readonly SeriesRow[]
Implementation of
draw()
draw(
target,context):void
Defined in: packages/core/src/series/candle-series.ts:102
Parameters
target
context
Returns
void
Implementation of
valueExtent()
valueExtent(
data):Range|null
Defined in: packages/core/src/series/candle-series.ts:88
A candle occupies the low-to-high span. Looking only at close would let the wick stick out past the plot.
Parameters
data
Returns
Range | null