charton API / @chart-on/core / index / IndicatorSeries
Interface: IndicatorSeries
Defined in: packages/core/src/indicators/series.ts:114
Draws every plot of one indicator. Outputs are aligned with the main series, so output position k is timeline index k.
Extends
Properties
front
protectedfront:FrontChange=NO_FRONT_CHANGE
Defined in: packages/core/src/series.ts:324
How the latest history page changed the front of the data, for prependAligned.
Inherited from
host
protectedreadonlyhost:SeriesHost
Defined in: packages/core/src/series.ts:331
Inherited from
id
readonlyid:string
Defined in: packages/core/src/series.ts:314
Inherited from
kind
readonlykind:"indicator"='indicator'
Defined in: packages/core/src/indicators/series.ts:115
Overrides
options
options:
IndicatorSeriesOptions
Defined in: packages/core/src/series.ts:317
Inherited from
overlayScale
overlayScale:
PriceScale|null=null
Defined in: packages/core/src/series.ts:320
Own price scale when the series is an overlay; otherwise the pane scale is used.
Inherited from
pane
pane:
Pane
Defined in: packages/core/src/series.ts:333
The pane the series draws in; change it with chart.moveSeries.
Inherited from
rangeBuilder
protectedreadonlyrangeBuilder:RangeBuilder
Defined in: packages/core/src/series.ts:322
Reused by priceRange so autoscale makes no RangeBuilder per frame.
Inherited from
visible
visible:
boolean=true
Defined in: packages/core/src/series.ts:316
Inherited from
Accessors
drawsOnGpu
Get Signature
get drawsOnGpu():
boolean
Defined in: packages/core/src/series.ts:595
Internal
Drawn on the GPU canvas, which sits below every series drawn in 2D.
Returns
boolean
Inherited from
hasCrosshairMarker
Get Signature
get hasCrosshairMarker():
boolean
Defined in: packages/core/src/series.ts:580
Internal
Whether drawCrosshair2D draws anything.
Returns
boolean
Inherited from
inAutoscale
Get Signature
get inAutoscale():
boolean
Defined in: packages/core/src/series.ts:536
False while the autoscale option leaves this series out of the fit.
Returns
boolean
Inherited from
locale
Get Signature
get
protectedlocale():Localizer
Defined in: packages/core/src/series.ts:405
The chart's number language (the localization option).
Returns
Inherited from
priceFormat
Get Signature
get priceFormat():
PriceFormatModel|null
Defined in: packages/core/src/series.ts:410
The priceFormat option resolved in the chart's number language, or null when the series has none.
Returns
PriceFormatModel | null
Inherited from
priceLineByDefault
Get Signature
get
protectedpriceLineByDefault():boolean
Defined in: packages/core/src/series.ts:633
Whether the price line is on when the option is unset.
Returns
boolean
Inherited from
pulse
Get Signature
get
protectedpulse():PulseClock|null
Defined in: packages/core/src/series.ts:390
Internal
The last-point pulse's clock; null on a chart without the lastPointPulse() plugin.
Returns
PulseClock | null
Inherited from
scale
Get Signature
get scale():
PriceScale
Defined in: packages/core/src/series.ts:441
The price scale this series is drawn against.
Returns
Inherited from
zIndex
Get Signature
get zIndex():
number
Defined in: packages/core/src/series.ts:349
Draw order within the pane among series drawn by the same renderer: a higher value draws on top. GPU series (candles, histograms, heatmaps, lines and areas) always draw below 2D series (curved lines, custom series, anything with renderer: 'canvas'). Equal values keep the usual order (heatmaps, then overlays and volume profiles, then the rest, each in the order added). Changing it only redraws. Default 0.
Returns
number
Set Signature
set zIndex(
value):void
Defined in: packages/core/src/series.ts:353
Parameters
value
number
Returns
void
Inherited from
Methods
appendAligned()
appendAligned():
void
Defined in: packages/core/src/series.ts:502
The main series gained a bar at the end of the timeline. Series with an incremental path align only their new items; others realign fully.
Returns
void
Inherited from
applyOptions()
applyOptions(
partial):void
Defined in: packages/core/src/series.ts:360
Parameters
partial
Partial<O>
Returns
void
Inherited from
dispose()
dispose():
void
Defined in: packages/core/src/indicators/series.ts:154
Stop the runner, so a pending async compute cannot redraw a removed series or destroyed chart, and free the histogram, line and fill batches' GPU objects.
Returns
void
Overrides
draw2D()
draw2D(
ctx,env):void
Defined in: packages/core/src/indicators/series.ts:755
Internal
Paint this series' canvas part for the pane.
Parameters
ctx
CanvasRenderingContext2D
env
Returns
void
Overrides
drawBelow()
drawBelow(
ctx,env):void
Defined in: packages/core/src/indicators/series.ts:673
Background plots: each bar's (or bucket's) palette colour over the pane's full height, a run of one colour as one rect.
Parameters
ctx
CanvasRenderingContext2D
env
Returns
void
Overrides
drawCrosshair2D()
drawCrosshair2D(
_ctx,_env):void
Defined in: packages/core/src/series.ts:589
Internal
A marker at the crosshair (env.crosshair), on the crosshair layer: it redraws on every crosshair move, draw2D does not.
Parameters
_ctx
CanvasRenderingContext2D
_env
Returns
void
Inherited from
drawGL()
drawGL(
r,env):void
Defined in: packages/core/src/indicators/series.ts:576
Internal
Record this series' GPU draws for the pane.
Parameters
r
RenderBackend
env
Returns
void
Overrides
firstValueFrom()
firstValueFrom(
_index,_field?):number|undefined
Defined in: packages/core/src/series.ts:523
First value at or after logical index: the base of percent and indexed scales. field asks for the bar's open; series without one give their value.
Parameters
_index
number
_field?
"close" | "open"
Returns
number | undefined
Inherited from
fitRange()
fitRange(
from,to): [number,number] |null
Defined in: packages/core/src/series.ts:545
The range this series adds to its scale's autoscale: priceRange passed through the autoscale option. A throwing function is reported once and the series fits its values meanwhile; a non-finite result adds nothing.
Parameters
from
number
to
number
Returns
[number, number] | null
Inherited from
followMain()
followMain(
_bars,_kind,_added?):void
Defined in: packages/core/src/series.ts:488
Re-derive the data from the main bars when the series has a follow option. On 'prepend', added is the number of bars that now lead bars.
Parameters
_bars
readonly Bar[]
_kind
_added?
number
Returns
void
Inherited from
formatValue()
formatValue(
value):string
Defined in: packages/core/src/series.ts:431
Label text for a value: priceFormat when set, else a format option you passed, else the pane scale's format (see scaleFormat) for a series on that scale, else compact.
Parameters
value
number
Returns
string
Inherited from
hits()
hits(
index,y):boolean
Defined in: packages/core/src/indicators/series.ts:845
Internal
Whether a shown plot is drawn at timeline index within a few px of pane-relative y: a line near its value (while grouped, anywhere in its bucket's range), a histogram column from its base to its value.
Parameters
index
number
y
number
Returns
boolean
labelValueAt()
protectedlabelValueAt(_i):LastValue|null
Defined in: packages/core/src/series.ts:619
The label value of data item i, ignoring lastValueLabel; for the price line.
Parameters
_i
number
Returns
LastValue | null
Inherited from
lastIndexAtOrBefore()
lastIndexAtOrBefore(
_index):number
Defined in: packages/core/src/series.ts:628
Internal
Data index of the newest item at or before logical index on the time axis (Infinity: the newest item), or -1.
Parameters
_index
number
Returns
number
Inherited from
lastValue()
lastValue():
LastValue|null
Defined in: packages/core/src/series.ts:605
The newest value's price-axis label while lastValueLabel is on.
Returns
LastValue | null
Inherited from
lastValues()
lastValues():
LastValue[]
Defined in: packages/core/src/indicators/series.ts:937
Price-axis labels for the newest values; series with several outputs return several.
Returns
Overrides
legend()
legend(
index):LegendEntry
Defined in: packages/core/src/indicators/series.ts:888
Legend row at logical index; view is the chart's legend mode (candles also read showChange).
Parameters
index
number
Returns
Overrides
prependAligned()
prependAligned(
_bars):void
Defined in: packages/core/src/series.ts:512
The main series gained bars older bars at the front of the timeline (a history page), so every timeline index grew by bars. Series with an incremental path shift their alignment and align and write only the new items; others realign fully.
Parameters
_bars
number
Returns
void
Inherited from
priceLine()
priceLine(
visibleTo):SeriesPriceLine|null
Defined in: packages/core/src/series.ts:638
Where this series' price line sits, given the newest visible logical index; null when it is off.
Parameters
visibleTo
number
Returns
SeriesPriceLine | null
Inherited from
priceLines()
priceLines(
visibleTo):SeriesPriceLine[]
Defined in: packages/core/src/indicators/series.ts:918
Internal
One price line per shown line, histogram or OHLC plot with priceLine on.
Parameters
visibleTo
number
Returns
Overrides
priceRange()
priceRange(
from,to,positiveOnly?): [number,number] |null
Defined in: packages/core/src/indicators/series.ts:512
Min/max over visible logical indices for autoscale, or null. With positiveOnly (the default on a log scale) values at or below zero are left out.
Parameters
from
number
to
number
positiveOnly?
boolean = ...
Returns
[number, number] | null
Overrides
pulseFor()
protectedpulseFor(option):PulseClock|null
Defined in: packages/core/src/series.ts:396
Internal
The clock to draw pulse option with; null without the plugin, which development builds say once.
Parameters
option
LastPointPulse | undefined
Returns
PulseClock | null
Inherited from
realign()
realign():
void
Defined in: packages/core/src/indicators/series.ts:240
Outputs follow the main series bar for bar; the runner reports changes.
Returns
void
Overrides
rebuild()
rebuild():
void
Defined in: packages/core/src/indicators/series.ts:235
Rebuild GPU/CPU caches from data, options and theme.
Returns
void
Overrides
refollow()
protectedrefollow():void
Defined in: packages/core/src/series.ts:491
The follow option changed: map the main bars again, or drop the derived points when it was removed.
Returns
void
Inherited from
refresh()
refresh(
from):void
Defined in: packages/core/src/indicators/series.ts:243
Re-upload histogram columns for bars [from, length), and mark the line vertices from there stale.
Parameters
from
number
Returns
void
setPlotStyles()
setPlotStyles(
styles):void
Defined in: packages/core/src/indicators/series.ts:198
Internal
The plot styles set over the definition's; the indicator keeps styles up to date.
Parameters
styles
Readonly<Record<string, PlotStyle>>
Returns
void
setStatus()
setStatus(
loading,message):void
Defined in: packages/core/src/indicators/series.ts:190
Internal
Loading marker for the legend and a message for the pane (null for none).
Parameters
loading
boolean
message
string | null
Returns
void
setVisible()
setVisible(
visible):void
Defined in: packages/core/src/indicators/series.ts:225
Shown or hidden, the bars' colours follow.
Parameters
visible
boolean
Returns
void
Overrides
step()
step(
_dt):boolean
Defined in: packages/core/src/series.ts:446
Advance per-series animations by dt ms; true while still animating.
Parameters
_dt
number
Returns
boolean
Inherited from
stepOverlay()
stepOverlay(
_dt):boolean
Defined in: packages/core/src/series.ts:455
Advance animations drawn only on the overlay (such as the last-point pulse) by dt ms, after the frame drew; true when the overlay needs another frame.
Parameters
_dt
number
Returns
boolean