charton API / @chart-on/core / index / VolumeProfileSeries
Class: VolumeProfileSeries
Defined in: packages/core/src/profile/series.ts:118
Volume-by-price histogram built from the main candle series. Rows are GPU spans; POC and value-area lines are drawn on the overlay. The visible-range profile is recomputed (throttled) when the bars on screen change; session profiles are computed once and only the last session follows live bars.
Extends
Constructors
Constructor
new VolumeProfileSeries(
host,pane,options,source):VolumeProfileSeries
Defined in: packages/core/src/profile/series.ts:136
Parameters
host
SeriesHost
pane
options
Partial<VolumeProfileOptions>
source
() => CandleSeries | null
Returns
VolumeProfileSeries
Overrides
Properties
batch
readonlybatch:RectBatch
Defined in: packages/core/src/profile/series.ts:120
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:"volumeProfile"='volumeProfile'
Defined in: packages/core/src/profile/series.ts:119
Overrides
options
options:
VolumeProfileOptions
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/profile/series.ts:145
Parameters
partial
Partial<VolumeProfileOptions>
Returns
void
Overrides
dispose()
dispose():
void
Defined in: packages/core/src/profile/series.ts:302
Release timers, subscriptions and other resources. The chart calls it once when the series leaves it: removeSeries, removing its pane, or destroy.
Returns
void
Overrides
draw2D()
draw2D(
ctx,env):void
Defined in: packages/core/src/profile/series.ts:212
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/series.ts:574
Internal
Paint behind every series and the GPU layer, clipped to the pane, e.g. background shading.
Parameters
_ctx
CanvasRenderingContext2D
_env
Returns
void
Inherited from
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/profile/series.ts:192
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
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/series.ts:610
Price-axis labels for the newest values; series with several outputs return several.
Returns
Inherited from
legend()
legend(
index):LegendEntry
Defined in: packages/core/src/profile/series.ts:251
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/series.ts:647
Internal
The price lines drawn this frame: the series' own, or one per plot for an indicator.
Parameters
visibleTo
number
Returns
Inherited from
priceRange()
priceRange(
_from,_to,_positiveOnly?): [number,number] |null
Defined in: packages/core/src/series.ts:531
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
Inherited from
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/profile/series.ts:188
Recompute timeline indices after main data changes.
Returns
void
Overrides
rebuild()
rebuild():
void
Defined in: packages/core/src/profile/series.ts:166
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
setVisible()
setVisible(
visible):void
Defined in: packages/core/src/series.ts:477
Parameters
visible
boolean
Returns
void
Inherited from
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