Class: CandlestickLayer
Defined in: layers/candlestick.ts:114
A drawable data series backed by GPU buffers.
Implements
Constructors
Constructor
new CandlestickLayer(gl, opts): CandlestickLayer;Defined in: layers/candlestick.ts:148
Parameters
| Parameter | Type |
|---|---|
gl | WebGL2RenderingContext |
opts | CandlestickOptions |
Returns
CandlestickLayer
Properties
colorCss
readonly colorCss: string;Defined in: layers/candlestick.ts:117
id
readonly id: string;Defined in: layers/candlestick.ts:115
Implementation of
name
readonly name: string;Defined in: layers/candlestick.ts:116
yAxis
readonly yAxis: string;Defined in: layers/candlestick.ts:118
The y axis this layer is bound to.
Implementation of
Methods
appendCandle()
appendCandle(c): void;Defined in: layers/candlestick.ts:283
Append one new candle (grows the series). Prefer updateLast for the in-progress candle and appendCandle only when a bar closes and a new one opens.
Parameters
| Parameter | Type |
|---|---|
c | Candle |
Returns
void
bounds()
bounds():
| {
x: Range;
y: Range;
}
| null;Defined in: layers/candlestick.ts:315
Data-space bounds of this layer, for autoscaling. null if empty.
Returns
| { x: Range; y: Range; } | null
Implementation of
dispose()
dispose(): void;Defined in: layers/candlestick.ts:339
Returns
void
Implementation of
draw()
draw(state): void;Defined in: layers/candlestick.ts:320
Parameters
| Parameter | Type |
|---|---|
state | DrawState |
Returns
void
Implementation of
setData()
setData(data): void;Defined in: layers/candlestick.ts:273
Replace every candle and re-upload (for streaming a whole new window).
Parameters
| Parameter | Type |
|---|---|
data | CandlestickData |
Returns
void
updateLast()
updateLast(c): void;Defined in: layers/candlestick.ts:295
Update the most recent candle in place — the cheap hot path for a live (forming) bar. Only that candle's 12 floats are re-uploaded; bounds are extended (never shrunk) to include it. No-op when the series is empty.
Parameters
| Parameter | Type |
|---|---|
c | Candle |
Returns
void