Documentation / @finchart/core / index / BaselineSeries
Class: BaselineSeries
Defined in: packages/core/src/series/baseline-series.ts:66
A series colored differently above and below a threshold value — a P&L curve, performance versus a benchmark.
The crossing is cut by linear interpolation — switching color point by point without cutting would flip color at a bar, painting the wrong color onto the span that merely grazes the baseline. The gap rule is the same as area's — both fill and line break there.
Implements
Constructors
Constructor
new BaselineSeries(
options?):BaselineSeries
Defined in: packages/core/src/series/baseline-series.ts:71
Parameters
options?
Returns
BaselineSeries
Properties
coordinates
readonlycoordinates:CoordinateAccessor<LineDataPoint> =LINE_COORDINATES
Defined in: packages/core/src/series/baseline-series.ts:67
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
Methods
draw()
draw(
target,context):void
Defined in: packages/core/src/series/baseline-series.ts:90
Parameters
target
context
Returns
void
Implementation of
valueExtent()
valueExtent(
data):Range|null
Defined in: packages/core/src/series/baseline-series.ts:77
This is the line's extent — the baseline itself occupies no value space (unlike a bar).
Parameters
data
Returns
Range | null