AnyChart
API Reference
Still have questions?
Contact support
Top

class anychart.core.stock.Plot Improve this Doc

Extends: anychart.core.VisualBaseWithBounds

Stock Plot class.

Methods Overview

Specific settings
addSeries()Add series to chart.
annotations()Creates annotations.
defaultSeriesType()Default series type.
getSeriesAt()Gets series by its index.
getSeriesCount()Returns series count.
maxPointWidth()Maximum point width settings.
minPointLength()Minimum point length settings.
pointWidth()Point width settings.
removeAllSeries()Removes all series from chart.
removeSeries()Removes one of series from chart by its id.
removeSeriesAt()Removes one of series from chart by its index.
title()Title settings.
Axes and Scales
baseline()Set the baseline by the Y-Scale value.
lineMarker()Get or create a new line marker instance by index.
priceIndicator()Price indicator settings.
rangeMarker()Get or create a new range marker instance by index.
textMarker()Get or create a new text marker instance by index.
xAxis()X-axis settings.
xGrid()Grid settings.
xMinorGrid()Minor grid settings by X-scale.
yAxis()Y-axis settings.
yGrid()Grid settings.
yMinorGrid()Minor grid settings by Y-scale.
yScale()Y-scale settings.
Chart Coloring
hatchFillPalette()Hatch fill palette settings.
markerPalette()Markers palette settings.
palette()Palette settings.
Chart Controls
legend()Legend settings.
Coloring
background()Background settings.
dataArea()Data area settings.
Data
getStat()Getter for a statistical value by the key.
noData()NoData settings.
Interactivity
crosshair()Crosshair settings
enabled()Element state (enabled or disabled).
Point Elements
eventMarkers()Event markers settings
Series
area()Adds Area series.
candlestick()Adds Candlestick series.
column()Adds Column series.
getSeries()Gets series by its id.
hilo()Adds HiLo series.
jumpLine()Adds Jump Line series.
line()Adds Line series.
marker()Adds Marker series.
ohlc()Adds OHLC series.
rangeArea()Adds Range Area series.
rangeColumn()Adds Range Column series.
rangeSplineArea()Adds Range Spline Area series.
rangeStepArea()Adds Range Step Area series.
spline()Adds Spline series.
splineArea()Adds Spline Area series.
stepArea()Adds Step Area series.
stepLine()Adds Step line series.
stick()Adds Stick series.
Size and Position
bottom()Bottom bound settings.
bounds()Bounds settings.
getPixelBounds()Returns pixel bounds.
height()Height settings.
isExpanded()Getter method, whether plot is expanded.
left()Left bound settings.
maxHeight()Maximum height.
maxWidth()Maximum width.
minHeight()Minimum height.
minWidth()Minimum width.
moveDown()Moves plot down in stock chart.
moveUp()Moves plot up in stock chart.
right()Right bound settings.
toggleExpandedState()Toggles plot's "expanded" state.
top()Top bound settings.
width()Width settings.
zIndex()Z-index of the element.
Technical Indicators
adl()Creates an Accumulation Distribution Line indicator on the plot.
ama()Creates AMA (Adaptive Moving Average) indicator on the plot.
ao()Creates an Awesome Oscillator indicator on the plot.
aroon()Creates Aroon indicator on the plot.
aroonOscillator()Creates Aroon Oscillator indicator on the plot.
atr()Creates an Average True Range indicator on the plot.
bbands()Creates Bollinger Bands indicator on the plot.
bbandsB()Creates %B indicator on the plot.
bbandsWidth()Creates Bollinger Bands Width indicator on the plot.
cci()Creates a Commodity Channel Index indicator on the chart.
cho()Creates a Chaikin Oscillator indicator on the chart.
cmf()Creates a Chaikin Money Flow indicator on the chart.
coppockCurve()Creates a Coppock Curve indicator on the chart.
dmi()Creates a Directional Movement Index indicator on the chart.
ema()Creates EMA (Exponential Moving Average) indicator on the plot.
env()Creates ENV (Envelope) indicator on the plot.
ha()Creates a Heikin-Ashi indicator on the plot.
ikh()Creates an Ichimoku Cloud (IKH) indicator on the plot.
kdj()Creates a KDJ indicator on the plot.
keltnerChannels()Creates a Keltner Channels indicator on the plot.
macd()Creates MACD (Moving Average Convergence Divergence) indicator on the plot.
mfi()Creates a MFI (Money Flow Index) indicator on the plot.
mma()Creates MMA (Modified Moving Average) indicator on the plot.
momentum()Creates a Momentum indicator on the plot.
obv()Creates an On Balance Volume indicator on the plot.
ppo()Creates PPO (Price Oscillator) indicator on the plot.
priceChannels()Creates a Price Channels indicator on the plot.
psar()Creates a PSAR (Parabolic SAR) indicator on the plot.
psy()Creates a PSY (The Psychological Line) indicator on the plot.
rat()Creates RAT (Ratiocator) indicator on the plot.
rci()Creates a RCI (Rank Correlation Index) indicator on the plot.
roc()Creates RoC (Rate of Change) indicator on the plot.
rsi()Creates RSI (Relative Strength Index) indicator on the plot.
sma()Creates SMA (Simple Moving Average) indicator on the plot.
stochastic()Creates a Stochastic indicator on the plot.
trix()Creates a TRIX indicator on the plot.
volumeMa()Creates a Volume + MA indicator on the plot.
vwap()Creates a Volume Weighted Average Price (VWAP) indicator on the plot.
williamsR()Creates a Williams %R indicator on the plot.
wma()Creates WMA (Weighted Moving Average) indicator on the plot.

Methods Description

addSeries

Add series to chart.

Params:

NameTypeDescription
var_argsanychart.data.TableMappingChart series data.

Returns:

Array.<anychart.core.stock.series.Base> - Array of created series.

adl

Creates an Accumulation Distribution Line indicator on the plot.

Params:

NameTypeDescription
mappinganychart.data.TableMappingData mapping.
seriesTypeanychart.enums.StockSeriesType | stringSeries type.

Returns:

anychart.core.stock.indicators.ADL - Returns an Accumulation Distribution Line indicator.

ama

Creates AMA (Adaptive Moving Average) indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
periodnumber
20
Period.
fastPeriodnumber
2
Fast period.
slowPeriodnumber
30
Slow period.
seriesTypeanychart.enums.StockSeriesType | string
"line"
Series type for AMA indicator.

Returns:

anychart.core.stock.indicators.AMA - Returns AMA (Adaptive Moving Average) indicator.

annotations

Getter for the plot annotations.

Returns:

anychart.core.annotations.PlotController - The plot annotations.
Setter for the plot annotations.

Params:

NameTypeDescription
annotationsListArrayAnnotations list to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

ao

Creates an Awesome Oscillator indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
fastPeriodnumber
5
Indicator fast period.
slowPeriodnumber
34
Indicator slow period.
maTypeanychart.enums.MovingAverageType | string
'sma
Indicator smoothing type.
seriesTypeanychart.enums.StockSeriesType | string
'line'
Series type.

Returns:

anychart.core.stock.indicators.AO - Returns Awesome Oscillator indicator.

area

Creates and returns a new Area series.

Params:

NameTypeDescription
dataanychart.data.TableMapping | anychart.data.Table | Array.<Array.<*>> | stringData for the series.
mappingSettingsObject.<string, ({column: number, type: (anychart.enums.AggregationType|string), weights: number}|number)>An object where keys are field names and values are objects with fields: - 'column': number - Column index, that the field should get values from; - 'type': anychart.enums.AggregationType|string - How to group values for the field. Defaults to 'close'. - 'weights': number - Column to get weights from for 'weightedAverage' grouping type. Note: If type set to 'weightedAverage', but opt_weightsColumn is not passed - uses 'average' grouping instead. or numbers - just the column index to get values from. In this case the grouping type will be set to 'close'.
csvSettingsObjectIf CSV string is passed, you can pass CSV parser settings here as a hash map.

Returns:

anychart.core.stock.series.Area - An instance of the created series.

aroon

Creates Aroon indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping
periodnumber
25
Period
upSeriesTypeanychart.enums.StockSeriesType | string
"line"
Up Series type for the Aroon indicator.
downSeriesTypeanychart.enums.StockSeriesType | string
"line"
Down Series type for the Aroon indicator.

Returns:

anychart.core.stock.indicators.Aroon - Returns Aroon indicator.

aroonOscillator

Creates Aroon Oscillator indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping
periodnumber
25
Period
seriesTypeanychart.enums.StockSeriesType | string
"area"
Series type for the Aroon Oscillator indicator.

Returns:

anychart.core.stock.indicators.AroonOscillator - Returns Aroon Oscillator indicator.

atr

Creates an Average True Range indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
periodnumber
14
Moving average period value.
seriesTypeanychart.enums.StockSeriesType | string
"line"
Series type for the Average True Range indicator.

Returns:

anychart.core.stock.indicators.ATR - Returns an Average True Range indicator.

background

Getter for the plot background.

Returns:

anychart.core.ui.Background - Chart background.
Setter for the plot background.

Params:

NameTypeDescription
settingsstring | Object | null | booleanBackground settings to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

baseline

Getter for the baseline.

Returns:

number - The baseline value by the Y-Scale.
See listing
var plot = chart.plot();
var baseline = plot.baseline();
Setter for the baseline.
The baseline is the line relative to which the series with the negative or positive value is drawn and painted over.

Params:

NameTypeDefaultDescription
valuenumber
0
Y-Scale value for the baseline.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

bbands

Creates Bollinger Bands indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
periodnumber
20
Moving average period value.
deviationnumber
2
The multiplier is applied to the moving average to compute upper and lower bands of the indicator.
middleSeriesTypeanychart.enums.StockSeriesType | string
"line"
Middle Series type for the Bollinger Bands indicator.
upperSeriesTypeanychart.enums.StockSeriesType | string
"line"
Upper Series type for the Bollinger Bands indicator.
lowerSeriesTypeanychart.enums.StockSeriesType | string
"line"
Lower Series type for the Bollinger Bands indicator.

Returns:

anychart.core.stock.indicators.BBands - Returns Bollinger Bands indicator.

bbandsB

Creates %B indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
periodnumber
20
Moving average period value.
deviationnumber
2
The multiplier is applied to the moving average to compute upper and lower bands of the indicator.
seriesTypeanychart.enums.StockSeriesType | string
"line"
Series type for the %B indicator.

Returns:

anychart.core.stock.indicators.BBandsB - Returns %B indicator.

bbandsWidth

Creates Bollinger Bands Width indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
periodnumber
20
Moving average period value.
deviationnumber
2
The multiplier is applied to the moving average to compute upper and lower bands of the indicator.
seriesTypeanychart.enums.StockSeriesType | string
"line"
Series type for the Bollinger Bands Width indicator.

Returns:

anychart.core.stock.indicators.BBandsWidth - Returns Bollinger Bands Width indicator.

bottom

Getter for element bottom bound settings.

Returns:

number | string | undefined - Element's bottom bound setting.
Setter for element bottom bound settings.

Params:

NameTypeDefaultDescription
bottomnumber | string | null
null
Bottom bound settings for the element.

Returns:

anychart.core.stock.Plot - Returns self for method chaining.

bounds

Getter for element bounds settings.

Returns:

anychart.core.utils.Bounds - Bounds of the element.
Setter for bounds of the element using one parameter.

Params:

NameTypeDescription
boundsanychart.utils.RectObj | anychart.math.Rect | anychart.core.utils.BoundsBounds of element.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.
Setter for element bounds settings.

Params:

NameTypeDefaultDescription
xnumber | string
null
X-coordinate.
ynumber | string
null
Y-coordinate.
widthnumber | string
null
Width.
heightnumber | string
null
Height.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

candlestick

Creates and returns a new Candlestick series.

Params:

NameTypeDescription
dataanychart.data.TableMapping | anychart.data.Table | Array.<Array.<*>> | stringData for the series.
mappingSettingsObject.<string, ({column: number, type: (anychart.enums.AggregationType|string), weights: number}|number)>An object where keys are field names and values are objects with fields: - 'column': number - Column index, that the field should get values from; - 'type': anychart.enums.AggregationType|string - How to group values for the field. Defaults to 'close'. - 'weights': number - Column to get weights from for 'weightedAverage' grouping type. Note: If type set to 'weightedAverage', but opt_weightsColumn is not passed - uses 'average' grouping instead. or numbers - just the column index to get values from. In this case the grouping type will be set to 'close'.
csvSettingsObjectIf CSV string is passed, you can pass CSV parser settings here as a hash map.

Returns:

anychart.core.stock.series.Candlestick - An instance of the created series.

cci

Creates a Commodity Channel Index indicator on the chart.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
periodnumber
20
Moving average period value.
seriesTypeanychart.enums.StockSeriesType | string
Series type.

Returns:

anychart.core.stock.indicators.CCI - Returns a Commodity Channel Index indicator.

cho

Creates a Chaikin Oscillator indicator on the chart.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
fastPeriodnumber
3
Indicator fast period.
slowPeriodnumber
10
Indicator slow period.
maTypeanychart.enums.MovingAverageType | string
EMA
Indicator smoothing type.
seriesTypeanychart.enums.StockSeriesType | string
"line"
Series type.

Returns:

anychart.core.stock.indicators.CHO - Returns a Chaikin Oscillator indicator.

cmf

Creates a Chaikin Money Flow indicator on the chart.

Params:

NameTypeDescription
mappinganychart.data.TableMappingData mapping.
periodnumberMoving average period value.
seriesTypeanychart.enums.StockSeriesType | stringSeries type.

Returns:

anychart.core.stock.indicators.CMF - Returns a Chaikin Money Flow indicator.

column

Creates and returns a new Column series.

Params:

NameTypeDescription
dataanychart.data.TableMapping | anychart.data.Table | Array.<Array.<*>> | stringData to set.
mappingSettingsObject.<string, ({column: number, type: (anychart.enums.AggregationType|string), weights: number}|number)>An object where keys are field names and values are objects with fields: - 'column': number - Column index, that the field should get values from; - 'type': anychart.enums.AggregationType|string - How to group values for the field. Defaults to 'close'. - 'weights': number - Column to get weights from for 'weightedAverage' grouping type. Note: If type set to 'weightedAverage', but opt_weightsColumn is not passed - uses 'average' grouping instead. or numbers - just the column index to get values from. In this case the grouping type will be set to 'close'.
csvSettingsObjectIf CSV string is passed, you can pass CSV parser settings here as a hash map.

Returns:

anychart.core.stock.series.Column - An instance of the created series.

coppockCurve

Creates a Coppock Curve indicator on the chart.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
wmaPeriodnumber
10
WMA calculation period.
firstRocPeriodnumber
11
The first RoC calculation period.
secondRocPeriodnumber
14
The second RoC calculation period.
seriesTypeanychart.enums.StockSeriesType | string
Series type.

Returns:

anychart.core.stock.indicators.CoppockCurve - Returns a Coppock Curve indicator.

crosshair

Getter for crosshair settings.

Returns:

anychart.core.ui.Crosshair - Crosshair settings.
Setter for crosshair settings.
The plot crosshair settings have a higher priority than the chart crosshair settings.

Params:

NameTypeDescription
settingsObject | boolean | nullCrosshair settings.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

dataArea

Getter for the data area settings.

Returns:

anychart.core.ui.DataArea - Data area settings.
Setter for the data area settings.
The data area is drawn along the data bounds.

Params:

NameTypeDescription
settingsObject | booleanData area settings to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

defaultSeriesType

Getter for the default stock plot series type.

Returns:

anychart.enums.StockSeriesType | string - Default series type.
Setter for the stock plot defaultSeriesType.

Params:

NameTypeDescription
typeanychart.enums.StockSeriesType | stringDefault series type.

Returns:

anychart.core.stock.Plot - Self instance for method chaining

dmi

Creates a Directional Movement Index indicator on the chart.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
periodnumber
14
Moving average period value.
adxPeriodnumber
14
Period for ADX.
useWildersSmoothingboolean
true
Wilders smoothing mode.
pdiSeriesTypeanychart.enums.StockSeriesType | string
"line"
Type for +DI series.
ndiSeriesTypeanychart.enums.StockSeriesType | string
"line"
Type for -DI series.
adxSeriesTypeanychart.enums.StockSeriesType | string
"line"
Type for ADX series.

Returns:

anychart.core.stock.indicators.DMI - Returns a Directional Movement Index indicator.

ema

Creates EMA (Exponential Moving Average) indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
periodnumber
20
Period.
seriesTypeanychart.enums.StockSeriesType | string
"line"
Series type for EMA indicator (type as "line", "column", "ohlc").

Returns:

anychart.core.stock.indicators.EMA - Returns EMA (Exponential Moving Average) indicator.

enabled

Getter for the element state (enabled or disabled).

Returns:

boolean - Element state.
Setter for the element enabled state.

Params:

NameTypeDefaultDescription
enabledboolean
true
Enabled state to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.
Example.
if (!element.enabled())
   element.enabled(true);

env

Creates ENV (Envelope) indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
periodnumber
20
Period.
deviationnumber
10
Deviation.
maTypeanychart.enums.MovingAverageType | string
"ema"
Indicator smoothing type.
upperSeriesTypeanychart.enums.StockSeriesType | string
"line"
Series type.
lowerSeriesTypeanychart.enums.StockSeriesType | string
"line"
Series type.

Returns:

anychart.core.stock.indicators.ENV - Returns ENV (Envelope) indicator.

eventMarkers

Getter for the event markers controller.

Returns:

anychart.core.stock.eventMarkers.Controller - Plot controller instance.
Setter for the event markers controller.

Params:

NameTypeDefaultDescription
valueObject | boolean | null
true
Value to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

getPixelBounds

Returns pixel bounds of the element due to parent bounds and self bounds settings.

Returns:

anychart.math.Rect - Pixel bounds of the element.

getSeries

Gets series by its id.

Params:

NameTypeDefaultDescription
idnumber | string
index
Id of the series.

Returns:

anychart.core.stock.series.Base - An instance of the created series.

getSeriesAt

Gets series by its index.

Params:

NameTypeDescription
indexnumberIndex of the series.

Returns:

anychart.core.stock.series.Base - An instance of the created series.

getSeriesCount

Returns series count.

Returns:

number - Number of series.

getStat

Getter for a statistical value by the key.

Params:

NameTypeDescription
keyanychart.enums.Statistics | stringKey.

Returns:

* - Statistics value.

ha

Creates a Heikin-Ashi indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
seriesTypeanychart.enums.StockSeriesType | string
'candlestick'
Series type.

Returns:

anychart.core.stock.indicators.HA - Returns Heikin-Ashi indicator.

hatchFillPalette

Getter for the hatch fill palette settings.

Returns:

anychart.palettes.HatchFills - The plot hatch fill palette.
See listing
var hatchFillPalette = plot.hatchFillPalette();
Setter for hatch fill palette settings.

Params:

NameTypeDescription
valueArray.<anychart.graphics.vector.HatchFill.HatchFillType> | Object | anychart.palettes.HatchFillsPlot hatch fill palette settings to set.

Returns:

anychart.palettes.HatchFills | anychart.core.stock.Plot - Self instance for method chaining.

height

Getter for element height settings.

Returns:

number | string | undefined - Element's height setting.
Setter for element height setting.

Params:

NameTypeDefaultDescription
heightnumber | string | null
null
Height settings for the element.

Returns:

anychart.core.stock.Plot - Returns self for method chaining.

hilo

Creates and returns a new HiLo series.

Params:

NameTypeDescription
dataanychart.data.TableMapping | anychart.data.Table | Array.<Array.<*>> | stringValue to set.
mappingSettingsObject.<({column: number, type: (anychart.enums.AggregationType|string), weights: number}|number)>An object where keys are field names and values are objects with fields: - 'column': number - Column index, that the field should get values from; - 'type': anychart.enums.AggregationType|string - How to group values for the field. Defaults to 'close'. - 'weights': number - Column to get weights from for 'weightedAverage' grouping type. Note: If type set to 'weightedAverage', but opt_weightsColumn is not passed - uses 'average' grouping instead. or numbers - just the column index to get values from. In this case the grouping type will be set to 'close'.
csvSettingsObjectCSV parser settings if the string is passed.

Returns:

anychart.core.stock.series.Hilo - An instance of the created series.

ikh

Creates an Ichimoku Cloud (IKH) indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
conversionPeriodnumber
9
Indicator conversion line period.
basePeriodnumber
26
Indicator Base line period.
leadingPeriodnumber
52
Indicator Leading span period. Also used to move the Cloud forward..
conversionSeriesTypeanychart.enums.StockSeriesType | string
"line"
Conversion series type.
baseSeriesTypeanychart.enums.StockSeriesType | string
"line"
Base series type.
leadingSeriesTypeanychart.enums.StockSeriesType | string
"range-area"
Leading span series type.
laggingSeriesTypeanychart.enums.StockSeriesType | string
"line"
Lagging series type.

Returns:

anychart.core.stock.indicators.IKH - Returns an Ichimoku Cloud (IKH) indicator.

isExpanded

Getter method, whether plot is expanded.

Returns:

boolean - Whether the plot is expanded.

jumpLine

Creates and returns a new Jump Line series.

Params:

NameTypeDescription
dataanychart.data.TableMapping | anychart.data.Table | Array.<Array.<*>> | stringValue to set.
mappingSettingsObject.<string, ({column: number, type: (anychart.enums.AggregationType|string), weights: number}|number)>An object where keys are field names and values are objects with fields: - 'column': number - Column index, that the field should get values from; - 'type': anychart.enums.AggregationType|string - How to group values for the field. Defaults to 'close'. - 'weights': number - Column to get weights from for 'weightedAverage' grouping type. Note: If type set to 'weightedAverage', but opt_weightsColumn is not passed - uses 'average' grouping instead. or numbers - just the column index to get values from. In this case the grouping type will be set to 'close'.
csvSettingsObjectIf CSV string is passed, you can pass CSV parser settings here as a hash map.

Returns:

anychart.core.stock.series.JumpLine - An instance of the created series.

kdj

Creates a KDJ indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
kPeriodnumber
14
Moving average period value for %K.
kMAPeriodnumber
5
Indicator %K smoothing period.
dPeriodnumber
5
Moving average period value for %D.
kMATypeanychart.enums.MovingAverageType | string
"ema"
Indicator %K smoothing type.
dMATypeanychart.enums.MovingAverageType | string
"ema"
Indicator %D smoothing type.
kMultipliernumber
-2
The %K multiplier to calculate the % J values.
dMultipliernumber
3
The %D multiplier to calculate the % J values.
kSeriesTypeanychart.enums.StockSeriesType | string
"line"
Series type for %K value.
dSeriesTypeanychart.enums.StockSeriesType | string
"line"
Series type for %D value.
jSeriesTypeanychart.enums.StockSeriesType | string
"line"
Series type for %J value.

Returns:

anychart.core.stock.indicators.KDJ - Returns a KDJ indicator.

keltnerChannels

Creates a Keltner Channels indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
maPeriodnumber
20
Moving Average period.
atrPeriodnumber
10
Average True Range period.
maTypeanychart.enums.MovingAverageType | string
'ema'
Indicator smoothing type.
multipliernumber
2
Multiplier.
maSeriesanychart.enums.StockSeriesType | string
'line'
Moving Average series type.

Returns:

anychart.core.stock.indicators.KeltnerChannels - Returns Keltner Channels indicator.

left

Getter for element left bound settings.

Returns:

number | string | undefined - Element's left bound setting.
Setter for element left bound settings.

Params:

NameTypeDefaultDescription
leftnumber | string | null
null
Left bound setting for the element.

Returns:

anychart.core.stock.Plot - Returns self for method chaining.

legend

Getter for the plot legend.

Returns:

anychart.core.ui.Legend - An instance of the class for method chaining.
Setter for the plot legend setting.

Params:

NameTypeDefaultDescription
valueObject | boolean | null
false
Legend settings.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

line

Creates and returns a new Line series.

Params:

NameTypeDescription
dataanychart.data.TableMapping | anychart.data.Table | Array.<Array.<*>> | stringData to set.
mappingSettingsObject.<string, ({column: number, type: (anychart.enums.AggregationType|string), weights: number}|number)>An object where keys are field names and values are objects with fields: - 'column': number - Column index, that the field should get values from; - 'type': anychart.enums.AggregationType|string - How to group values for the field. Defaults to 'close'. - 'weights': number - Column to get weights from for 'weightedAverage' grouping type. Note: If type set to 'weightedAverage', but opt_weightsColumn is not passed - uses 'average' grouping instead. or numbers - just the column index to get values from. In this case the grouping type will be set to 'close'.
csvSettingsObjectIf CSV string is passed, you can pass CSV parser settings here as a hash map.

Returns:

anychart.core.stock.series.Line - An instance of the created series.

lineMarker

Getter for the plot line marker.

Params:

NameTypeDescription
indexnumberMarker index.

Returns:

anychart.core.axisMarkers.Line - Line marker instance by index.
Setter for the plot line marker.

Params:

NameTypeDescription
settingsObject | boolean | nullPlot line marker settings to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.
Setter for the plot line marker settings by index.

Params:

NameTypeDefaultDescription
indexnumber
0
Plot line marker index.
settingsObject | boolean | null
Plot line marker settings to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

macd

Creates MACD (Moving Average Convergence Divergence) indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
fastPeriodnumber
12
Fast period. Fast period must be greater than the slow period.
slowPeriodnumber
26
Slow period.
signalPeriodnumber
9
Signal period.
macdSeriesTypeanychart.enums.StockSeriesType | string
"line"
Series type for MACD indicator (type as "line", "column", "ohlc").
signalSeriesTypeanychart.enums.StockSeriesType | string
"line"
Series type for signal (type as "line", "column", "ohlc").
histogramSeriesTypeanychart.enums.StockSeriesType | string
"column"
Series type for histogram (type as "line", "column", "ohlc").

Returns:

anychart.core.stock.indicators.MACD - Returns MACD (Moving Average Convergence Divergence) indicator.

marker

Creates and returns a new Marker series.

Params:

NameTypeDescription
dataanychart.data.TableMapping | anychart.data.Table | Array.<Array.<*>> | stringData for the series.
mappingSettingsObject.<string, ({column: number, type: (anychart.enums.AggregationType|string), weights: number}|number)>An object where keys are field names and values are objects with fields: - 'column': number - Column index, that the field should get values from; - 'type': anychart.enums.AggregationType|string - How to group values for the field. Defaults to 'close'. - 'weights': number - Column to get weights from for 'weightedAverage' grouping type. Note: If type set to 'weightedAverage', but opt_weightsColumn is not passed - uses 'average' grouping instead. or numbers - just the column index to get values from. In this case the grouping type will be set to 'close'.
csvSettingsObjectIf CSV string is passed, you can pass CSV parser settings here as a hash map.

Returns:

anychart.core.stock.series.Marker - An instance of the created series.

markerPalette

Getter for chart markers palette settings.

Returns:

anychart.palettes.Markers - Chart markers palette.
See listing
var markerPalette = plot.markerPalette();
Setter for the chart markers palette settings.

Params:

NameTypeDescription
valueanychart.palettes.Markers | Object | Array.<(anychart.enums.MarkerType|string)>Chart marker palette settings to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

maxHeight

Getter for the maximum height.

Returns:

number | string | null - Element's maximum height.
Setter for the maximum height.

Params:

NameTypeDefaultDescription
heightnumber | string | null
null
Maximum height to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

maxPointWidth

Getter for the maximum point width.

Returns:

string | number - The maximum point width pixel value.
See listing
var maxPointWidth = plot.maxPointWidth();
Setter for the maximum point width.

Params:

NameTypeDescription
widthnumber | stringPoint width pixel value.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

maxWidth

Getter for the maximum width.

Returns:

number | string | null - Element's maximum width.
Setter for the maximum width.

Params:

NameTypeDefaultDescription
widthnumber | string | null
null
Maximum width to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

mfi

Creates a MFI (Money Flow Index) indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
periodnumber
10
Period.
seriesTypeanychart.enums.StockSeriesType | string
"line"
Series type for MFI indicator.

Returns:

anychart.core.stock.indicators.MFI - Returns MFI (Money Flow Index) indicator.

minHeight

Getter for the minimum height.

Returns:

number | string | null - Element's minimum height.
Setter for the minimum height.

Params:

NameTypeDefaultDescription
heightnumber | string | null
null
Minimum height to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

minPointLength

Getter for the minimum point length.

Returns:

string | number - The minimum point length pixel value.
See listing
var minPointLength = plot.minPointLength();
Setter for the minimum point length.

Params:

NameTypeDescription
lengthnumber | stringMinimum point length pixel value.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

minWidth

Getter for the minimum width.

Returns:

number | string | null - Element's minimum width.
Setter for the minimum width.

Params:

NameTypeDefaultDescription
widthnumber | string | null
null
Minimum width to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

mma

Creates MMA (Modified Moving Average) indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
periodnumber
20
Period.
seriesTypeanychart.enums.StockSeriesType | string
"line"
Series type for MMA indicator.

Returns:

anychart.core.stock.indicators.MMA - Returns MMA (Modified Moving Average) indicator.

momentum

Creates a Momentum indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
periodnumber
14
Period.
seriesTypeanychart.enums.StockSeriesType | string
"line"
Series type for Momentum indicator.

Returns:

anychart.core.stock.indicators.Momentum - Returns a Momentum indicator.

moveDown

Moves plot down in stock chart.

Returns:

anychart.core.stock.Plot - Plot instance for method chaining.

moveUp

Moves plot up in stock chart.

Returns:

anychart.core.stock.Plot - Plot instance for method chaining.

noData

Getter for noData settings.

Returns:

anychart.core.NoDataSettings - NoData settings.
Setter for noData settings.
Learn more about "No data" feature

Params:

NameTypeDescription
valueObjectNoData settings.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

obv

Creates an On Balance Volume indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
seriesTypeanychart.enums.StockSeriesType | string
'line'
Series type.

Returns:

anychart.core.stock.indicators.OBV - Returns On Balance Volume indicator.

ohlc

Creates and returns a new OHLC series.

Params:

NameTypeDescription
dataanychart.data.TableMapping | anychart.data.Table | Array.<Array.<*>> | stringData to set.
mappingSettingsObject.<string, ({column: number, type: (anychart.enums.AggregationType|string), weights: number}|number)>An object where keys are field names and values are objects with fields: - 'column': number - Column index, that the field should get values from; - 'type': anychart.enums.AggregationType|string - How to group values for the field. Defaults to 'close'. - 'weights': number - Column to get weights from for 'weightedAverage' grouping type. Note: If type set to 'weightedAverage', but opt_weightsColumn is not passed - uses 'average' grouping instead. or numbers - just the column index to get values from. In this case the grouping type will be set to 'close'.
csvSettingsObjectIf CSV string is passed, you can pass CSV parser settings here as a hash map.

Returns:

anychart.core.stock.series.OHLC - An instance of the created series.

palette

Getter for the series colors palette.
Setter for the series colors palette.

Params:

NameTypeDescription
valueanychart.palettes.RangeColors | anychart.palettes.DistinctColors | Object | Array.<string>Series colors palette settings to set..

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

pointWidth

Getter for the point width settings.

Returns:

string | number - The point width pixel value.
See listing
var pointWidth = plot.pointWidth();
Setter for the point width settings.

Params:

NameTypeDescription
valuenumber | stringPoint width pixel value.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

ppo

Creates PPO (Price Oscillator) indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
shortPeriodnumber
12
Indicator short period.
longPeriodnumber
26
Indicator long period.
smoothingPeriodnumber
9
Indicator smoothing period.
ppoSeriesTypeanychart.enums.StockSeriesType | string
"line"
PPO line series type.
signalSeriesTypeanychart.enums.StockSeriesType | string
"line"
Signal line series type.
histogramSeriesTypeanychart.enums.StockSeriesType | string
"column"
PPO Histogram series type.

Returns:

anychart.core.stock.indicators.PPO - Returns Price Oscillator indicator.

priceChannels

Creates a Price Channels indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
periodnumber
20
Period.
middleSeriesTypeanychart.enums.StockSeriesType | string
"line"
Middle Series type for the Price Channels indicator.
rangeSeriesTypeanychart.enums.StockSeriesType | string
"range-area"
Range Series type for the Price Channels indicator.

Returns:

anychart.core.stock.indicators.PriceChannels - Returns a Price Channels indicator.

priceIndicator

Getter for the stock price indicator.

Params:

NameTypeDescription
indexnumberIndex to set.

Returns:

anychart.core.axisMarkers.CurrentPriceIndicator - Price indicator instance by index.
Setter for the stock price indicator settings.

Params:

NameTypeDescription
valueObject | boolean | nullChart price indicators settings to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.
Setter for the stock price indicator settings by index.

Params:

NameTypeDescription
indexnumberStock price indicator
valueObject | boolean | nullChart price indicators settings to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

psar

Creates a PSAR (Parabolic SAR) indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
accelerationFactorStartnumber
0.02
Start acceleration factor.
accelerationFactorIncrementnumber
0.02
Increment acceleration factor.
accelerationFactorMaximumnumber
0.2
Maximum acceleration factor value.
seriesTypeanychart.enums.StockSeriesType | string
"marker"
Series type for PSAR indicator.

Returns:

anychart.core.stock.indicators.PSAR - Returns a PSAR (Parabolic SAR) indicator.

psy

Creates a PSY (The Psychological Line) indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
periodnumber
20
Indicator period.
seriesTypeanychart.enums.StockSeriesType | string
"line"
Series type for PSY indicator.

Returns:

anychart.core.stock.indicators.PSY - Returns a PSY (The Psychological Line) indicator.

rangeArea

Creates and returns a new Range Area series.

Params:

NameTypeDescription
dataanychart.data.TableMapping | anychart.data.Table | Array.<Array.<*>> | stringData for the series.
mappingSettingsObject.<string, ({column: number, type: (anychart.enums.AggregationType|string), weights: number}|number)>An object where keys are field names and values are objects with fields: - 'column': number - Column index, that the field should get values from; - 'type': anychart.enums.AggregationType|string - How to group values for the field. Defaults to 'close'. - 'weights': number - Column to get weights from for 'weightedAverage' grouping type. Note: If type set to 'weightedAverage', but opt_weightsColumn is not passed - uses 'average' grouping instead. or numbers - just the column index to get values from. In this case the grouping type will be set to 'close'.
csvSettingsObjectIf CSV string is passed, you can pass CSV parser settings here as a hash map.

Returns:

anychart.core.stock.series.RangeArea - An instance of the created series.

rangeColumn

Creates and returns a new Range Column series.

Params:

NameTypeDescription
dataanychart.data.TableMapping | anychart.data.Table | Array.<Array.<*>> | stringData for the series.
mappingSettingsObject.<string, ({column: number, type: (anychart.enums.AggregationType|string), weights: number}|number)>An object where keys are field names and values are objects with fields: - 'column': number - Column index, that the field should get values from; - 'type': anychart.enums.AggregationType|string - How to group values for the field. Defaults to 'close'. - 'weights': number - Column to get weights from for 'weightedAverage' grouping type. Note: If type set to 'weightedAverage', but opt_weightsColumn is not passed - uses 'average' grouping instead. or numbers - just the column index to get values from. In this case the grouping type will be set to 'close'.
csvSettingsObjectIf CSV string is passed, you can pass CSV parser settings here as a hash map.

Returns:

anychart.core.stock.series.RangeColumn - An instance of the created series.

rangeMarker

Getter for the plot range marker.

Params:

NameTypeDescription
indexnumberRange marker index.

Returns:

anychart.core.axisMarkers.Range - Range marker instance by index.
Setter for the plot range marker.

Params:

NameTypeDescription
settingsObject | boolean | nullPlot range marker settings to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.
Setter for the plot range marker settings by index.

Params:

NameTypeDefaultDescription
indexnumber
0
Plot range marker index.
settingsObject | boolean | null
Plot range marker settings to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

rangeSplineArea

Creates and returns a new Range Spline Area series.

Params:

NameTypeDescription
dataanychart.data.TableMapping | anychart.data.Table | Array.<Array.<*>> | stringData for the series.
mappingSettingsObject.<string, ({column: number, type: (anychart.enums.AggregationType|string), weights: number}|number)>An object where keys are field names and values are objects with fields: - 'column': number - Column index, that the field should get values from; - 'type': anychart.enums.AggregationType|string - How to group values for the field. Defaults to 'close'. - 'weights': number - Column to get weights from for 'weightedAverage' grouping type. Note: If type set to 'weightedAverage', but opt_weightsColumn is not passed - uses 'average' grouping instead. or numbers - just the column index to get values from. In this case the grouping type will be set to 'close'.
csvSettingsObjectIf CSV string is passed, you can pass CSV parser settings here as a hash map.

Returns:

anychart.core.stock.series.RangeSplineArea - An instance of the created series.

rangeStepArea

Creates and returns a new Range Step Area series.

Params:

NameTypeDescription
dataanychart.data.TableMapping | anychart.data.Table | Array.<Array.<*>> | stringData for the series.
mappingSettingsObject.<string, ({column: number, type: (anychart.enums.AggregationType|string), weights: number}|number)>An object where keys are field names and values are objects with fields: - 'column': number - Column index, that the field should get values from; - 'type': anychart.enums.AggregationType|string - How to group values for the field. Defaults to 'close'. - 'weights': number - Column to get weights from for 'weightedAverage' grouping type. Note: If type set to 'weightedAverage', but opt_weightsColumn is not passed - uses 'average' grouping instead. or numbers - just the column index to get values from. In this case the grouping type will be set to 'close'.
csvSettingsObjectIf CSV string is passed, you can pass CSV parser settings here as a hash map.

Returns:

anychart.core.stock.series.RangeStepArea - An instance of the created series.

rat

Creates RAT (Ratiocator) indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
baseDate*
0
Start date of calculation. Start date is displayed in indicator series name and uses inputDateTimeFormat.
seriesTypeanychart.enums.StockSeriesType | string
"line"
Series type.

rci

Creates a RCI (Rank Correlation Index) indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
periodnumber
12
Indicator period.
seriesTypeanychart.enums.StockSeriesType | string
"line"
Series type for RCI indicator.

Returns:

anychart.core.stock.indicators.RCI - Returns a RCI (Rank Correlation Index) indicator.

removeAllSeries

Removes all series from chart.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

removeSeries

Removes one of series from chart by its id.

Params:

NameTypeDescription
idnumber | stringSeries id.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

removeSeriesAt

Removes one of series from chart by its index.

Params:

NameTypeDescription
indexnumberSeries index.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.
Getter for element right bound settings.

Returns:

number | string | undefined - Element's right bound setting.
Setter for element right bound setting.

Params:

NameTypeDefaultDescription
rightnumber | string | null
null
Right bound setting for the element.

Returns:

anychart.core.stock.Plot - Returns self for method chaining.

roc

Creates RoC (Rate of Change) indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
periodnumber
20
Period.
seriesTypeanychart.enums.StockSeriesType | string
"line"
Series type for RoC indicator (type as "line", "column", "ohlc").

Returns:

anychart.core.stock.indicators.RoC - Returns RoC (Rate of Change) indicator.

rsi

Creates RSI (Relative Strength Index) indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
periodnumber
14
Period.
seriesTypeanychart.enums.StockSeriesType | string
"line"
Series type for RSI indicator (type as "line", "column", "ohlc").

Returns:

anychart.core.stock.indicators.RSI - Returns RSI (Relative Strength Index) indicator.

sma

Creates SMA (Simple Moving Average) indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
periodnumber
20
Period.
seriesTypeanychart.enums.StockSeriesType | string
"line"
Series type for SMA indicator (type as "line", "column", "ohlc").

Returns:

anychart.core.stock.indicators.SMA - Returns SMA (Simple Moving Average) indicator.

spline

Creates and returns a new Spline series.

Params:

NameTypeDescription
dataanychart.data.TableMapping | anychart.data.Table | Array.<Array.<*>> | stringData for the series.
mappingSettingsObject.<string, ({column: number, type: (anychart.enums.AggregationType|string), weights: number}|number)>An object where keys are field names and values are objects with fields: - 'column': number - Column index, that the field should get values from; - 'type': anychart.enums.AggregationType|string - How to group values for the field. Defaults to 'close'. - 'weights': number - Column to get weights from for 'weightedAverage' grouping type. Note: If type set to 'weightedAverage', but opt_weightsColumn is not passed - uses 'average' grouping instead. or numbers - just the column index to get values from. In this case the grouping type will be set to 'close'.
csvSettingsObjectIf CSV string is passed, you can pass CSV parser settings here as a hash map.

Returns:

anychart.core.stock.series.Spline - An instance of the created series.

splineArea

Creates and returns a new Spline Area series.

Params:

NameTypeDescription
dataanychart.data.TableMapping | anychart.data.Table | Array.<Array.<*>> | stringData for the series.
mappingSettingsObject.<string, ({column: number, type: (anychart.enums.AggregationType|string), weights: number}|number)>An object where keys are field names and values are objects with fields: - 'column': number - Column index, that the field should get values from; - 'type': anychart.enums.AggregationType|string - How to group values for the field. Defaults to 'close'. - 'weights': number - Column to get weights from for 'weightedAverage' grouping type. Note: If type set to 'weightedAverage', but opt_weightsColumn is not passed - uses 'average' grouping instead. or numbers - just the column index to get values from. In this case the grouping type will be set to 'close'.
csvSettingsObjectIf CSV string is passed, you can pass CSV parser settings here as a hash map.

Returns:

anychart.core.stock.series.SplineArea - An instance of the created series.

stepArea

Creates and returns a new Step Area series.

Params:

NameTypeDescription
dataanychart.data.TableMapping | anychart.data.Table | Array.<Array.<*>> | stringData for the series.
mappingSettingsObject.<string, ({column: number, type: (anychart.enums.AggregationType|string), weights: number}|number)>An object where keys are field names and values are objects with fields: - 'column': number - Column index, that the field should get values from; - 'type': anychart.enums.AggregationType|string - How to group values for the field. Defaults to 'close'. - 'weights': number - Column to get weights from for 'weightedAverage' grouping type. Note: If type set to 'weightedAverage', but opt_weightsColumn is not passed - uses 'average' grouping instead. or numbers - just the column index to get values from. In this case the grouping type will be set to 'close'.
csvSettingsObjectIf CSV string is passed, you can pass CSV parser settings here as a hash map.

Returns:

anychart.core.stock.series.StepArea - An instance of the created series.

stepLine

Creates and returns a new Step Line series.

Params:

NameTypeDescription
dataanychart.data.TableMapping | anychart.data.Table | Array.<Array.<*>> | stringData for the series.
mappingSettingsObject.<string, ({column: number, type: (anychart.enums.AggregationType|string), weights: number}|number)>An object where keys are field names and values are objects with fields: - 'column': number - Column index, that the field should get values from; - 'type': anychart.enums.AggregationType|string - How to group values for the field. Defaults to 'close'. - 'weights': number - Column to get weights from for 'weightedAverage' grouping type. Note: If type set to 'weightedAverage', but opt_weightsColumn is not passed - uses 'average' grouping instead. or numbers - just the column index to get values from. In this case the grouping type will be set to 'close'.
csvSettingsObjectIf CSV string is passed, you can pass CSV parser settings here as a hash map.

Returns:

anychart.core.stock.series.StepLine - An instance of the created series.

stick

Creates and returns a new Stick series.

Params:

NameTypeDescription
dataanychart.data.TableMapping | anychart.data.Table | Array.<Array.<*>> | stringValue to set.
mappingSettingsObject.<string, ({column: number, type: (anychart.enums.AggregationType|string), weights: number}|number)>An object where keys are field names and values are objects with fields: - 'column': number - Column index, that the field should get values from; - 'type': anychart.enums.AggregationType|string - How to group values for the field. Defaults to 'close'. - 'weights': number - Column to get weights from for 'weightedAverage' grouping type. Note: If type set to 'weightedAverage', but opt_weightsColumn is not passed - uses 'average' grouping instead. or numbers - just the column index to get values from. In this case the grouping type will be set to 'close'.
csvSettingsObjectIf CSV string is passed, you can pass CSV parser settings here as a hash map.

Returns:

anychart.core.stock.series.Stick - An instance of the created series.

stochastic

Creates a Stochastic indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
kPeriodnumber
14
Moving average period value for %K.
kMAPeriodnumber
1
Indicator %K smoothing period.
dPeriodnumber
3
Moving average period value for %D.
kMATypeanychart.enums.MovingAverageType | string
SMA
Indicator %K smoothing type.
dMATypeanychart.enums.MovingAverageType | string
SMA
Indicator %D smoothing type.
kSeriesTypeanychart.enums.StockSeriesType | string
"line"
Series type for %K value.
dSeriesTypeanychart.enums.StockSeriesType | string
"line"
Series type for %D value.

Returns:

anychart.core.stock.indicators.Stochastic - Returns a Stochastic indicator.

textMarker

Getter for the plot text marker.

Params:

NameTypeDescription
indexnumberText marker index.

Returns:

anychart.core.axisMarkers.Text - Range marker instance by index.
Setter for the plot text marker.

Params:

NameTypeDescription
settingsObject | boolean | nullPlot text marker settings to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.
Setter for the plot text marker settings by index.

Params:

NameTypeDefaultDescription
indexnumber
0
Plot text marker index.
settingsObject | boolean | null
Plot text marker settings to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

title

Getter for the plot title.

Returns:

anychart.core.ui.Title - The plot title.
Setter for the plot title.

Params:

NameTypeDescription
settingsnull | boolean | Object | stringPlot title settings to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

toggleExpandedState

Toggles plot's "expanded" state.

Returns:

anychart.core.stock.Plot - plot instance for method chaining.

top

Getter for element top bound settings.

Returns:

number | string | undefined - Element's top bound setting.
Setter for element top bound settings.

Params:

NameTypeDefaultDescription
topnumber | string | null
null
Top bound setting for the element.

Returns:

anychart.core.stock.Plot - Returns self for method chaining.

trix

Creates a TRIX indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
periodnumber
15
Indicator TRIX period.
signalPeriodnumber
9
Indicator signal period.
maTypeanychart.enums.MovingAverageType
'ema'
Indicator smoothing type.
signalMaTypeanychart.enums.MovingAverageType
'ema'
Indicator signal smoothing type.
trixSeriesTypeanychart.enums.StockSeriesType | string
'line'
TRIX series type.
signalSeriesTypeanychart.enums.StockSeriesType | string
'line'
Signal series type.

Returns:

anychart.core.stock.indicators.TRIX - Returns TRIX indicator.

volumeMa

Creates a Volume + MA indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
maPeriodnumber
20
Moving Average period.
maTypeanychart.enums.MovingAverageType | string
'sma'
Indicator Moving Average type.
volumeSeriesTypeanychart.enums.StockSeriesType | string
'stick'
Volume series type.
maSeriesTypeanychart.enums.StockSeriesType | string
'line'
Moving Average series type.

Returns:

anychart.core.stock.indicators.VolumeMA - Returns Volume + MA indicator.

vwap

Creates a Volume Weighted Average Price (VWAP) indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
vwapSeriesTypeanychart.enums.StockSeriesType | string
'line'
Indicator series type.

Returns:

anychart.core.stock.indicators.VWAP - Returns VWAP indicator.

width

Getter for element width settings.

Returns:

number | string | undefined - Element's width setting.
Setter for element width setting.

Params:

NameTypeDefaultDescription
widthnumber | string | null
null
Width settings for the element.

Returns:

anychart.core.stock.Plot - Returns self for method chaining.

williamsR

Creates a Williams %R indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
periodnumber
10
Period.
seriesTypeanychart.enums.StockSeriesType | string
"line"
Series type for Williams %R indicator.

Returns:

anychart.core.stock.indicators.WilliamsR - Returns a Williams %R indicator.

wma

Creates WMA (Weighted Moving Average) indicator on the plot.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
periodnumber
9
Period.
seriesTypeanychart.enums.StockSeriesType | string
"line"
Series type for WMA indicator (type as "line", "column", "area").

Returns:

anychart.core.stock.indicators.WMA - Returns WMA (Weighted Moving Average) indicator.

xAxis

Getter for the X-axis.

Returns:

anychart.core.axes.StockDateTime - Axis instance.
Setter for the X-axis.

Params:

NameTypeDescription
settingsObject | boolean | nullChart axis settings to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

xGrid

Getter for the plot grid by X-scale.

Params:

NameTypeDescription
indexnumberGrid index.

Returns:

anychart.core.grids.Stock - Grid instance by index.
Setter for the plot grid by X-scale.

Params:

NameTypeDescription
settingsObject | boolean | nullGrid settings to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.
Setter for the plot grid by index.

Params:

NameTypeDescription
indexnumberGrid index.
settingsObject | boolean | nullGrid settings to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

xMinorGrid

Getter for the plot grid by X-scale.

Params:

NameTypeDescription
indexnumberMinor grid index.

Returns:

anychart.core.grids.Stock - Minor grid instance by index.
Setter for the plot grid by X-scale.

Params:

NameTypeDescription
settingsObject | boolean | nullMinor grid settings to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.
Setter for the plot grid by index.

Params:

NameTypeDescription
indexOrValuenumberMinor grid index.
settingsObject | boolean | nullMinor grid settings to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

yAxis

Getter for the plot Y-axis.

Params:

NameTypeDescription
indexnumberAxis index.

Returns:

anychart.core.axes.Linear - Axis instance by index.
Setter for the plot Y-axis.

Params:

NameTypeDescription
settingsObject | boolean | nullChart axis settings to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.
Setter for the Y-axis by index.

Params:

NameTypeDescription
indexnumberAxis index.
settingsObject | boolean | nullChart axis settings to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

yGrid

Getter for the plot grid by Y-scale.

Params:

NameTypeDescription
indexnumberGrid index.

Returns:

anychart.core.grids.Stock - Grid instance by index.
Setter for the plot grid by Y-scale.

Params:

NameTypeDescription
settingsObject | boolean | nullGrid settings to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.
Setter for the plot grid by index.

Params:

NameTypeDescription
indexnumberGrid index.
settingsObject | boolean | nullGrid settings to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

yMinorGrid

Getter for the plot grid by Y-scale.

Params:

NameTypeDescription
indexnumberMinor grid index.

Returns:

anychart.core.grids.Stock - Minor grid instance by index.
Setter for the plot grid by Y-scale.

Params:

NameTypeDescription
settingsObject | boolean | nullMinor grid settings to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.
Setter for the plot grid by index.

Params:

NameTypeDescription
indexOrValuenumberMinor grid index.
settingsObject | boolean | nullMinor grid settings to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

yScale

Getter for the default plot Y-scale.

Returns:

anychart.scales.ScatterBase - Default chart scale value.
See listing
var plot = chart.plot();
var yScale = plot.yScale();
Setter for the plot Y-scale.

Params:

NameTypeDefaultDescription
settingsanychart.enums.ScatterScaleTypes | string | anychart.scales.ScatterBase | Object
anychart.scales.Linear
Scale settings to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.

zIndex

Getter for the Z-index of the element.

Returns:

number - Z-index.
Setter for the Z-index of the element.

Params:

NameTypeDefaultDescription
zIndexnumber
0
Value to set.

Returns:

anychart.core.stock.Plot - Self instance for method chaining.